Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

2890 wiersze
111 KiB

  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package civicinfo provides access to the Google Civic Information API.
  6. //
  7. // For product documentation, see: https://developers.google.com/civic-information
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/civicinfo/v2"
  14. // ...
  15. // ctx := context.Background()
  16. // civicinfoService, err := civicinfo.NewService(ctx)
  17. //
  18. // In this example, Google Application Default Credentials are used for authentication.
  19. //
  20. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  21. //
  22. // Other authentication options
  23. //
  24. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  25. //
  26. // civicinfoService, err := civicinfo.NewService(ctx, option.WithAPIKey("AIza..."))
  27. //
  28. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  29. //
  30. // config := &oauth2.Config{...}
  31. // // ...
  32. // token, err := config.Exchange(ctx, ...)
  33. // civicinfoService, err := civicinfo.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  34. //
  35. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  36. package civicinfo // import "google.golang.org/api/civicinfo/v2"
  37. import (
  38. "bytes"
  39. "context"
  40. "encoding/json"
  41. "errors"
  42. "fmt"
  43. "io"
  44. "net/http"
  45. "net/url"
  46. "strconv"
  47. "strings"
  48. gensupport "google.golang.org/api/gensupport"
  49. googleapi "google.golang.org/api/googleapi"
  50. option "google.golang.org/api/option"
  51. htransport "google.golang.org/api/transport/http"
  52. )
  53. // Always reference these packages, just in case the auto-generated code
  54. // below doesn't.
  55. var _ = bytes.NewBuffer
  56. var _ = strconv.Itoa
  57. var _ = fmt.Sprintf
  58. var _ = json.NewDecoder
  59. var _ = io.Copy
  60. var _ = url.Parse
  61. var _ = gensupport.MarshalJSON
  62. var _ = googleapi.Version
  63. var _ = errors.New
  64. var _ = strings.Replace
  65. var _ = context.Canceled
  66. const apiId = "civicinfo:v2"
  67. const apiName = "civicinfo"
  68. const apiVersion = "v2"
  69. const basePath = "https://www.googleapis.com/civicinfo/v2/"
  70. // NewService creates a new Service.
  71. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  72. client, endpoint, err := htransport.NewClient(ctx, opts...)
  73. if err != nil {
  74. return nil, err
  75. }
  76. s, err := New(client)
  77. if err != nil {
  78. return nil, err
  79. }
  80. if endpoint != "" {
  81. s.BasePath = endpoint
  82. }
  83. return s, nil
  84. }
  85. // New creates a new Service. It uses the provided http.Client for requests.
  86. //
  87. // Deprecated: please use NewService instead.
  88. // To provide a custom HTTP client, use option.WithHTTPClient.
  89. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  90. func New(client *http.Client) (*Service, error) {
  91. if client == nil {
  92. return nil, errors.New("client is nil")
  93. }
  94. s := &Service{client: client, BasePath: basePath}
  95. s.Divisions = NewDivisionsService(s)
  96. s.Elections = NewElectionsService(s)
  97. s.Representatives = NewRepresentativesService(s)
  98. return s, nil
  99. }
  100. type Service struct {
  101. client *http.Client
  102. BasePath string // API endpoint base URL
  103. UserAgent string // optional additional User-Agent fragment
  104. Divisions *DivisionsService
  105. Elections *ElectionsService
  106. Representatives *RepresentativesService
  107. }
  108. func (s *Service) userAgent() string {
  109. if s.UserAgent == "" {
  110. return googleapi.UserAgent
  111. }
  112. return googleapi.UserAgent + " " + s.UserAgent
  113. }
  114. func NewDivisionsService(s *Service) *DivisionsService {
  115. rs := &DivisionsService{s: s}
  116. return rs
  117. }
  118. type DivisionsService struct {
  119. s *Service
  120. }
  121. func NewElectionsService(s *Service) *ElectionsService {
  122. rs := &ElectionsService{s: s}
  123. return rs
  124. }
  125. type ElectionsService struct {
  126. s *Service
  127. }
  128. func NewRepresentativesService(s *Service) *RepresentativesService {
  129. rs := &RepresentativesService{s: s}
  130. return rs
  131. }
  132. type RepresentativesService struct {
  133. s *Service
  134. }
  135. // AdministrationRegion: Describes information about a regional election
  136. // administrative area.
  137. type AdministrationRegion struct {
  138. // ElectionAdministrationBody: The election administration body for this
  139. // area.
  140. ElectionAdministrationBody *AdministrativeBody `json:"electionAdministrationBody,omitempty"`
  141. // Id: An ID for this object. IDs may change in future requests and
  142. // should not be cached. Access to this field requires special access
  143. // that can be requested from the Request more link on the Quotas page.
  144. Id string `json:"id,omitempty"`
  145. // LocalJurisdiction: The city or county that provides election
  146. // information for this voter. This object can have the same elements as
  147. // state.
  148. LocalJurisdiction *AdministrationRegion `json:"local_jurisdiction,omitempty"`
  149. // Name: The name of the jurisdiction.
  150. Name string `json:"name,omitempty"`
  151. // Sources: A list of sources for this area. If multiple sources are
  152. // listed the data has been aggregated from those sources.
  153. Sources []*Source `json:"sources,omitempty"`
  154. // ForceSendFields is a list of field names (e.g.
  155. // "ElectionAdministrationBody") to unconditionally include in API
  156. // requests. By default, fields with empty values are omitted from API
  157. // requests. However, any non-pointer, non-interface field appearing in
  158. // ForceSendFields will be sent to the server regardless of whether the
  159. // field is empty or not. This may be used to include empty fields in
  160. // Patch requests.
  161. ForceSendFields []string `json:"-"`
  162. // NullFields is a list of field names (e.g.
  163. // "ElectionAdministrationBody") to include in API requests with the
  164. // JSON null value. By default, fields with empty values are omitted
  165. // from API requests. However, any field with an empty value appearing
  166. // in NullFields will be sent to the server as null. It is an error if a
  167. // field in this list has a non-empty value. This may be used to include
  168. // null fields in Patch requests.
  169. NullFields []string `json:"-"`
  170. }
  171. func (s *AdministrationRegion) MarshalJSON() ([]byte, error) {
  172. type NoMethod AdministrationRegion
  173. raw := NoMethod(*s)
  174. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  175. }
  176. // AdministrativeBody: Information about an election administrative body
  177. // (e.g. County Board of Elections).
  178. type AdministrativeBody struct {
  179. // AbsenteeVotingInfoUrl: A URL provided by this administrative body for
  180. // information on absentee voting.
  181. AbsenteeVotingInfoUrl string `json:"absenteeVotingInfoUrl,omitempty"`
  182. AddressLines []string `json:"addressLines,omitempty"`
  183. // BallotInfoUrl: A URL provided by this administrative body to give
  184. // contest information to the voter.
  185. BallotInfoUrl string `json:"ballotInfoUrl,omitempty"`
  186. // CorrespondenceAddress: The mailing address of this administrative
  187. // body.
  188. CorrespondenceAddress *SimpleAddressType `json:"correspondenceAddress,omitempty"`
  189. // ElectionInfoUrl: A URL provided by this administrative body for
  190. // looking up general election information.
  191. ElectionInfoUrl string `json:"electionInfoUrl,omitempty"`
  192. // ElectionOfficials: The election officials for this election
  193. // administrative body.
  194. ElectionOfficials []*ElectionOfficial `json:"electionOfficials,omitempty"`
  195. // ElectionRegistrationConfirmationUrl: A URL provided by this
  196. // administrative body for confirming that the voter is registered to
  197. // vote.
  198. ElectionRegistrationConfirmationUrl string `json:"electionRegistrationConfirmationUrl,omitempty"`
  199. // ElectionRegistrationUrl: A URL provided by this administrative body
  200. // for looking up how to register to vote.
  201. ElectionRegistrationUrl string `json:"electionRegistrationUrl,omitempty"`
  202. // ElectionRulesUrl: A URL provided by this administrative body
  203. // describing election rules to the voter.
  204. ElectionRulesUrl string `json:"electionRulesUrl,omitempty"`
  205. // HoursOfOperation: A description of the hours of operation for this
  206. // administrative body.
  207. HoursOfOperation string `json:"hoursOfOperation,omitempty"`
  208. // Name: The name of this election administrative body.
  209. Name string `json:"name,omitempty"`
  210. // PhysicalAddress: The physical address of this administrative body.
  211. PhysicalAddress *SimpleAddressType `json:"physicalAddress,omitempty"`
  212. // VoterServices: A description of the services this administrative body
  213. // may provide.
  214. VoterServices []string `json:"voter_services,omitempty"`
  215. // VotingLocationFinderUrl: A URL provided by this administrative body
  216. // for looking up where to vote.
  217. VotingLocationFinderUrl string `json:"votingLocationFinderUrl,omitempty"`
  218. // ForceSendFields is a list of field names (e.g.
  219. // "AbsenteeVotingInfoUrl") to unconditionally include in API requests.
  220. // By default, fields with empty values are omitted from API requests.
  221. // However, any non-pointer, non-interface field appearing in
  222. // ForceSendFields will be sent to the server regardless of whether the
  223. // field is empty or not. This may be used to include empty fields in
  224. // Patch requests.
  225. ForceSendFields []string `json:"-"`
  226. // NullFields is a list of field names (e.g. "AbsenteeVotingInfoUrl") to
  227. // include in API requests with the JSON null value. By default, fields
  228. // with empty values are omitted from API requests. However, any field
  229. // with an empty value appearing in NullFields will be sent to the
  230. // server as null. It is an error if a field in this list has a
  231. // non-empty value. This may be used to include null fields in Patch
  232. // requests.
  233. NullFields []string `json:"-"`
  234. }
  235. func (s *AdministrativeBody) MarshalJSON() ([]byte, error) {
  236. type NoMethod AdministrativeBody
  237. raw := NoMethod(*s)
  238. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  239. }
  240. // Candidate: Information about a candidate running for elected office.
  241. type Candidate struct {
  242. // CandidateUrl: The URL for the candidate's campaign web site.
  243. CandidateUrl string `json:"candidateUrl,omitempty"`
  244. // Channels: A list of known (social) media channels for this candidate.
  245. Channels []*Channel `json:"channels,omitempty"`
  246. // Email: The email address for the candidate's campaign.
  247. Email string `json:"email,omitempty"`
  248. // Name: The candidate's name. If this is a joint ticket it will
  249. // indicate the name of the candidate at the top of a ticket followed by
  250. // a / and that name of candidate at the bottom of the ticket. e.g.
  251. // "Mitt Romney / Paul Ryan"
  252. Name string `json:"name,omitempty"`
  253. // OrderOnBallot: The order the candidate appears on the ballot for this
  254. // contest.
  255. OrderOnBallot int64 `json:"orderOnBallot,omitempty,string"`
  256. // Party: The full name of the party the candidate is a member of.
  257. Party string `json:"party,omitempty"`
  258. // Phone: The voice phone number for the candidate's campaign office.
  259. Phone string `json:"phone,omitempty"`
  260. // PhotoUrl: A URL for a photo of the candidate.
  261. PhotoUrl string `json:"photoUrl,omitempty"`
  262. // ForceSendFields is a list of field names (e.g. "CandidateUrl") to
  263. // unconditionally include in API requests. By default, fields with
  264. // empty values are omitted from API requests. However, any non-pointer,
  265. // non-interface field appearing in ForceSendFields will be sent to the
  266. // server regardless of whether the field is empty or not. This may be
  267. // used to include empty fields in Patch requests.
  268. ForceSendFields []string `json:"-"`
  269. // NullFields is a list of field names (e.g. "CandidateUrl") to include
  270. // in API requests with the JSON null value. By default, fields with
  271. // empty values are omitted from API requests. However, any field with
  272. // an empty value appearing in NullFields will be sent to the server as
  273. // null. It is an error if a field in this list has a non-empty value.
  274. // This may be used to include null fields in Patch requests.
  275. NullFields []string `json:"-"`
  276. }
  277. func (s *Candidate) MarshalJSON() ([]byte, error) {
  278. type NoMethod Candidate
  279. raw := NoMethod(*s)
  280. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  281. }
  282. // Channel: A social media or web channel for a candidate.
  283. type Channel struct {
  284. // Id: The unique public identifier for the candidate's channel.
  285. Id string `json:"id,omitempty"`
  286. // Type: The type of channel. The following is a list of types of
  287. // channels, but is not exhaustive. More channel types may be added at a
  288. // later time. One of: GooglePlus, YouTube, Facebook, Twitter
  289. Type string `json:"type,omitempty"`
  290. // ForceSendFields is a list of field names (e.g. "Id") to
  291. // unconditionally include in API requests. By default, fields with
  292. // empty values are omitted from API requests. However, any non-pointer,
  293. // non-interface field appearing in ForceSendFields will be sent to the
  294. // server regardless of whether the field is empty or not. This may be
  295. // used to include empty fields in Patch requests.
  296. ForceSendFields []string `json:"-"`
  297. // NullFields is a list of field names (e.g. "Id") to include in API
  298. // requests with the JSON null value. By default, fields with empty
  299. // values are omitted from API requests. However, any field with an
  300. // empty value appearing in NullFields will be sent to the server as
  301. // null. It is an error if a field in this list has a non-empty value.
  302. // This may be used to include null fields in Patch requests.
  303. NullFields []string `json:"-"`
  304. }
  305. func (s *Channel) MarshalJSON() ([]byte, error) {
  306. type NoMethod Channel
  307. raw := NoMethod(*s)
  308. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  309. }
  310. // Contest: Information about a contest that appears on a voter's
  311. // ballot.
  312. type Contest struct {
  313. // BallotPlacement: A number specifying the position of this contest on
  314. // the voter's ballot.
  315. BallotPlacement int64 `json:"ballotPlacement,omitempty,string"`
  316. // BallotTitle: The official title on the ballot for this contest, only
  317. // where available.
  318. BallotTitle string `json:"ballotTitle,omitempty"`
  319. // Candidates: The candidate choices for this contest.
  320. Candidates []*Candidate `json:"candidates,omitempty"`
  321. // District: Information about the electoral district that this contest
  322. // is in.
  323. District *ElectoralDistrict `json:"district,omitempty"`
  324. // ElectorateSpecifications: A description of any additional eligibility
  325. // requirements for voting in this contest.
  326. ElectorateSpecifications string `json:"electorateSpecifications,omitempty"`
  327. // Id: An ID for this object. IDs may change in future requests and
  328. // should not be cached. Access to this field requires special access
  329. // that can be requested from the Request more link on the Quotas page.
  330. Id string `json:"id,omitempty"`
  331. // Level: The levels of government of the office for this contest. There
  332. // may be more than one in cases where a jurisdiction effectively acts
  333. // at two different levels of government; for example, the mayor of the
  334. // District of Columbia acts at "locality" level, but also effectively
  335. // at both "administrative-area-2" and "administrative-area-1".
  336. Level []string `json:"level,omitempty"`
  337. // NumberElected: The number of candidates that will be elected to
  338. // office in this contest.
  339. NumberElected int64 `json:"numberElected,omitempty,string"`
  340. // NumberVotingFor: The number of candidates that a voter may vote for
  341. // in this contest.
  342. NumberVotingFor int64 `json:"numberVotingFor,omitempty,string"`
  343. // Office: The name of the office for this contest.
  344. Office string `json:"office,omitempty"`
  345. // PrimaryParty: If this is a partisan election, the name of the party
  346. // it is for.
  347. PrimaryParty string `json:"primaryParty,omitempty"`
  348. // ReferendumBallotResponses: The set of ballot responses for the
  349. // referendum. A ballot response represents a line on the ballot. Common
  350. // examples might include "yes" or "no" for referenda. This field is
  351. // only populated for contests of type 'Referendum'.
  352. ReferendumBallotResponses []string `json:"referendumBallotResponses,omitempty"`
  353. // ReferendumBrief: Specifies a short summary of the referendum that is
  354. // typically on the ballot below the title but above the text. This
  355. // field is only populated for contests of type 'Referendum'.
  356. ReferendumBrief string `json:"referendumBrief,omitempty"`
  357. // ReferendumConStatement: A statement in opposition to the referendum.
  358. // It does not necessarily appear on the ballot. This field is only
  359. // populated for contests of type 'Referendum'.
  360. ReferendumConStatement string `json:"referendumConStatement,omitempty"`
  361. // ReferendumEffectOfAbstain: Specifies what effect abstaining (not
  362. // voting) on the proposition will have (i.e. whether abstaining is
  363. // considered a vote against it). This field is only populated for
  364. // contests of type 'Referendum'.
  365. ReferendumEffectOfAbstain string `json:"referendumEffectOfAbstain,omitempty"`
  366. // ReferendumPassageThreshold: The threshold of votes that the
  367. // referendum needs in order to pass, e.g. "two-thirds". This field is
  368. // only populated for contests of type 'Referendum'.
  369. ReferendumPassageThreshold string `json:"referendumPassageThreshold,omitempty"`
  370. // ReferendumProStatement: A statement in favor of the referendum. It
  371. // does not necessarily appear on the ballot. This field is only
  372. // populated for contests of type 'Referendum'.
  373. ReferendumProStatement string `json:"referendumProStatement,omitempty"`
  374. // ReferendumSubtitle: A brief description of the referendum. This field
  375. // is only populated for contests of type 'Referendum'.
  376. ReferendumSubtitle string `json:"referendumSubtitle,omitempty"`
  377. // ReferendumText: The full text of the referendum. This field is only
  378. // populated for contests of type 'Referendum'.
  379. ReferendumText string `json:"referendumText,omitempty"`
  380. // ReferendumTitle: The title of the referendum (e.g. 'Proposition 42').
  381. // This field is only populated for contests of type 'Referendum'.
  382. ReferendumTitle string `json:"referendumTitle,omitempty"`
  383. // ReferendumUrl: A link to the referendum. This field is only populated
  384. // for contests of type 'Referendum'.
  385. ReferendumUrl string `json:"referendumUrl,omitempty"`
  386. // Roles: The roles which this office fulfills.
  387. Roles []string `json:"roles,omitempty"`
  388. // Sources: A list of sources for this contest. If multiple sources are
  389. // listed, the data has been aggregated from those sources.
  390. Sources []*Source `json:"sources,omitempty"`
  391. // Special: "Yes" or "No" depending on whether this a contest being held
  392. // outside the normal election cycle.
  393. Special string `json:"special,omitempty"`
  394. // Type: The type of contest. Usually this will be 'General', 'Primary',
  395. // or 'Run-off' for contests with candidates. For referenda this will be
  396. // 'Referendum'. For Retention contests this will typically be
  397. // 'Retention'.
  398. Type string `json:"type,omitempty"`
  399. // ForceSendFields is a list of field names (e.g. "BallotPlacement") to
  400. // unconditionally include in API requests. By default, fields with
  401. // empty values are omitted from API requests. However, any non-pointer,
  402. // non-interface field appearing in ForceSendFields will be sent to the
  403. // server regardless of whether the field is empty or not. This may be
  404. // used to include empty fields in Patch requests.
  405. ForceSendFields []string `json:"-"`
  406. // NullFields is a list of field names (e.g. "BallotPlacement") to
  407. // include in API requests with the JSON null value. By default, fields
  408. // with empty values are omitted from API requests. However, any field
  409. // with an empty value appearing in NullFields will be sent to the
  410. // server as null. It is an error if a field in this list has a
  411. // non-empty value. This may be used to include null fields in Patch
  412. // requests.
  413. NullFields []string `json:"-"`
  414. }
  415. func (s *Contest) MarshalJSON() ([]byte, error) {
  416. type NoMethod Contest
  417. raw := NoMethod(*s)
  418. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  419. }
  420. type ContextParams struct {
  421. ClientProfile string `json:"clientProfile,omitempty"`
  422. // ForceSendFields is a list of field names (e.g. "ClientProfile") to
  423. // unconditionally include in API requests. By default, fields with
  424. // empty values are omitted from API requests. However, any non-pointer,
  425. // non-interface field appearing in ForceSendFields will be sent to the
  426. // server regardless of whether the field is empty or not. This may be
  427. // used to include empty fields in Patch requests.
  428. ForceSendFields []string `json:"-"`
  429. // NullFields is a list of field names (e.g. "ClientProfile") to include
  430. // in API requests with the JSON null value. By default, fields with
  431. // empty values are omitted from API requests. However, any field with
  432. // an empty value appearing in NullFields will be sent to the server as
  433. // null. It is an error if a field in this list has a non-empty value.
  434. // This may be used to include null fields in Patch requests.
  435. NullFields []string `json:"-"`
  436. }
  437. func (s *ContextParams) MarshalJSON() ([]byte, error) {
  438. type NoMethod ContextParams
  439. raw := NoMethod(*s)
  440. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  441. }
  442. // DivisionRepresentativeInfoRequest: A request to look up
  443. // representative information for a single division.
  444. type DivisionRepresentativeInfoRequest struct {
  445. ContextParams *ContextParams `json:"contextParams,omitempty"`
  446. // ForceSendFields is a list of field names (e.g. "ContextParams") to
  447. // unconditionally include in API requests. By default, fields with
  448. // empty values are omitted from API requests. However, any non-pointer,
  449. // non-interface field appearing in ForceSendFields will be sent to the
  450. // server regardless of whether the field is empty or not. This may be
  451. // used to include empty fields in Patch requests.
  452. ForceSendFields []string `json:"-"`
  453. // NullFields is a list of field names (e.g. "ContextParams") to include
  454. // in API requests with the JSON null value. By default, fields with
  455. // empty values are omitted from API requests. However, any field with
  456. // an empty value appearing in NullFields will be sent to the server as
  457. // null. It is an error if a field in this list has a non-empty value.
  458. // This may be used to include null fields in Patch requests.
  459. NullFields []string `json:"-"`
  460. }
  461. func (s *DivisionRepresentativeInfoRequest) MarshalJSON() ([]byte, error) {
  462. type NoMethod DivisionRepresentativeInfoRequest
  463. raw := NoMethod(*s)
  464. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  465. }
  466. // DivisionSearchRequest: A search request for political geographies.
  467. type DivisionSearchRequest struct {
  468. ContextParams *ContextParams `json:"contextParams,omitempty"`
  469. // ForceSendFields is a list of field names (e.g. "ContextParams") to
  470. // unconditionally include in API requests. By default, fields with
  471. // empty values are omitted from API requests. However, any non-pointer,
  472. // non-interface field appearing in ForceSendFields will be sent to the
  473. // server regardless of whether the field is empty or not. This may be
  474. // used to include empty fields in Patch requests.
  475. ForceSendFields []string `json:"-"`
  476. // NullFields is a list of field names (e.g. "ContextParams") to include
  477. // in API requests with the JSON null value. By default, fields with
  478. // empty values are omitted from API requests. However, any field with
  479. // an empty value appearing in NullFields will be sent to the server as
  480. // null. It is an error if a field in this list has a non-empty value.
  481. // This may be used to include null fields in Patch requests.
  482. NullFields []string `json:"-"`
  483. }
  484. func (s *DivisionSearchRequest) MarshalJSON() ([]byte, error) {
  485. type NoMethod DivisionSearchRequest
  486. raw := NoMethod(*s)
  487. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  488. }
  489. // DivisionSearchResponse: The result of a division search query.
  490. type DivisionSearchResponse struct {
  491. // Kind: Identifies what kind of resource this is. Value: the fixed
  492. // string "civicinfo#divisionSearchResponse".
  493. Kind string `json:"kind,omitempty"`
  494. Results []*DivisionSearchResult `json:"results,omitempty"`
  495. // ServerResponse contains the HTTP response code and headers from the
  496. // server.
  497. googleapi.ServerResponse `json:"-"`
  498. // ForceSendFields is a list of field names (e.g. "Kind") to
  499. // unconditionally include in API requests. By default, fields with
  500. // empty values are omitted from API requests. However, any non-pointer,
  501. // non-interface field appearing in ForceSendFields will be sent to the
  502. // server regardless of whether the field is empty or not. This may be
  503. // used to include empty fields in Patch requests.
  504. ForceSendFields []string `json:"-"`
  505. // NullFields is a list of field names (e.g. "Kind") to include in API
  506. // requests with the JSON null value. By default, fields with empty
  507. // values are omitted from API requests. However, any field with an
  508. // empty value appearing in NullFields will be sent to the server as
  509. // null. It is an error if a field in this list has a non-empty value.
  510. // This may be used to include null fields in Patch requests.
  511. NullFields []string `json:"-"`
  512. }
  513. func (s *DivisionSearchResponse) MarshalJSON() ([]byte, error) {
  514. type NoMethod DivisionSearchResponse
  515. raw := NoMethod(*s)
  516. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  517. }
  518. // DivisionSearchResult: Represents a political geographic division that
  519. // matches the requested query.
  520. type DivisionSearchResult struct {
  521. // Aliases: Other Open Civic Data identifiers that refer to the same
  522. // division -- for example, those that refer to other political
  523. // divisions whose boundaries are defined to be coterminous with this
  524. // one. For example, ocd-division/country:us/state:wy will include an
  525. // alias of ocd-division/country:us/state:wy/cd:1, since Wyoming has
  526. // only one Congressional district.
  527. Aliases []string `json:"aliases,omitempty"`
  528. // Name: The name of the division.
  529. Name string `json:"name,omitempty"`
  530. // OcdId: The unique Open Civic Data identifier for this division.
  531. OcdId string `json:"ocdId,omitempty"`
  532. // ForceSendFields is a list of field names (e.g. "Aliases") to
  533. // unconditionally include in API requests. By default, fields with
  534. // empty values are omitted from API requests. However, any non-pointer,
  535. // non-interface field appearing in ForceSendFields will be sent to the
  536. // server regardless of whether the field is empty or not. This may be
  537. // used to include empty fields in Patch requests.
  538. ForceSendFields []string `json:"-"`
  539. // NullFields is a list of field names (e.g. "Aliases") to include in
  540. // API requests with the JSON null value. By default, fields with empty
  541. // values are omitted from API requests. However, any field with an
  542. // empty value appearing in NullFields will be sent to the server as
  543. // null. It is an error if a field in this list has a non-empty value.
  544. // This may be used to include null fields in Patch requests.
  545. NullFields []string `json:"-"`
  546. }
  547. func (s *DivisionSearchResult) MarshalJSON() ([]byte, error) {
  548. type NoMethod DivisionSearchResult
  549. raw := NoMethod(*s)
  550. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  551. }
  552. // Election: Information about the election that was queried.
  553. type Election struct {
  554. // ElectionDay: Day of the election in YYYY-MM-DD format.
  555. ElectionDay string `json:"electionDay,omitempty"`
  556. // Id: The unique ID of this election.
  557. Id int64 `json:"id,omitempty,string"`
  558. // Name: A displayable name for the election.
  559. Name string `json:"name,omitempty"`
  560. // OcdDivisionId: The political division of the election. Represented as
  561. // an OCD Division ID. Voters within these political jurisdictions are
  562. // covered by this election. This is typically a state such as
  563. // ocd-division/country:us/state:ca or for the midterms or general
  564. // election the entire US (i.e. ocd-division/country:us).
  565. OcdDivisionId string `json:"ocdDivisionId,omitempty"`
  566. // ForceSendFields is a list of field names (e.g. "ElectionDay") to
  567. // unconditionally include in API requests. By default, fields with
  568. // empty values are omitted from API requests. However, any non-pointer,
  569. // non-interface field appearing in ForceSendFields will be sent to the
  570. // server regardless of whether the field is empty or not. This may be
  571. // used to include empty fields in Patch requests.
  572. ForceSendFields []string `json:"-"`
  573. // NullFields is a list of field names (e.g. "ElectionDay") to include
  574. // in API requests with the JSON null value. By default, fields with
  575. // empty values are omitted from API requests. However, any field with
  576. // an empty value appearing in NullFields will be sent to the server as
  577. // null. It is an error if a field in this list has a non-empty value.
  578. // This may be used to include null fields in Patch requests.
  579. NullFields []string `json:"-"`
  580. }
  581. func (s *Election) MarshalJSON() ([]byte, error) {
  582. type NoMethod Election
  583. raw := NoMethod(*s)
  584. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  585. }
  586. // ElectionOfficial: Information about individual election officials.
  587. type ElectionOfficial struct {
  588. // EmailAddress: The email address of the election official.
  589. EmailAddress string `json:"emailAddress,omitempty"`
  590. // FaxNumber: The fax number of the election official.
  591. FaxNumber string `json:"faxNumber,omitempty"`
  592. // Name: The full name of the election official.
  593. Name string `json:"name,omitempty"`
  594. // OfficePhoneNumber: The office phone number of the election official.
  595. OfficePhoneNumber string `json:"officePhoneNumber,omitempty"`
  596. // Title: The title of the election official.
  597. Title string `json:"title,omitempty"`
  598. // ForceSendFields is a list of field names (e.g. "EmailAddress") to
  599. // unconditionally include in API requests. By default, fields with
  600. // empty values are omitted from API requests. However, any non-pointer,
  601. // non-interface field appearing in ForceSendFields will be sent to the
  602. // server regardless of whether the field is empty or not. This may be
  603. // used to include empty fields in Patch requests.
  604. ForceSendFields []string `json:"-"`
  605. // NullFields is a list of field names (e.g. "EmailAddress") to include
  606. // in API requests with the JSON null value. By default, fields with
  607. // empty values are omitted from API requests. However, any field with
  608. // an empty value appearing in NullFields will be sent to the server as
  609. // null. It is an error if a field in this list has a non-empty value.
  610. // This may be used to include null fields in Patch requests.
  611. NullFields []string `json:"-"`
  612. }
  613. func (s *ElectionOfficial) MarshalJSON() ([]byte, error) {
  614. type NoMethod ElectionOfficial
  615. raw := NoMethod(*s)
  616. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  617. }
  618. type ElectionsQueryRequest struct {
  619. ContextParams *ContextParams `json:"contextParams,omitempty"`
  620. // ForceSendFields is a list of field names (e.g. "ContextParams") to
  621. // unconditionally include in API requests. By default, fields with
  622. // empty values are omitted from API requests. However, any non-pointer,
  623. // non-interface field appearing in ForceSendFields will be sent to the
  624. // server regardless of whether the field is empty or not. This may be
  625. // used to include empty fields in Patch requests.
  626. ForceSendFields []string `json:"-"`
  627. // NullFields is a list of field names (e.g. "ContextParams") to include
  628. // in API requests with the JSON null value. By default, fields with
  629. // empty values are omitted from API requests. However, any field with
  630. // an empty value appearing in NullFields will be sent to the server as
  631. // null. It is an error if a field in this list has a non-empty value.
  632. // This may be used to include null fields in Patch requests.
  633. NullFields []string `json:"-"`
  634. }
  635. func (s *ElectionsQueryRequest) MarshalJSON() ([]byte, error) {
  636. type NoMethod ElectionsQueryRequest
  637. raw := NoMethod(*s)
  638. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  639. }
  640. // ElectionsQueryResponse: The list of elections available for this
  641. // version of the API.
  642. type ElectionsQueryResponse struct {
  643. // Elections: A list of available elections
  644. Elections []*Election `json:"elections,omitempty"`
  645. // Kind: Identifies what kind of resource this is. Value: the fixed
  646. // string "civicinfo#electionsQueryResponse".
  647. Kind string `json:"kind,omitempty"`
  648. // ServerResponse contains the HTTP response code and headers from the
  649. // server.
  650. googleapi.ServerResponse `json:"-"`
  651. // ForceSendFields is a list of field names (e.g. "Elections") to
  652. // unconditionally include in API requests. By default, fields with
  653. // empty values are omitted from API requests. However, any non-pointer,
  654. // non-interface field appearing in ForceSendFields will be sent to the
  655. // server regardless of whether the field is empty or not. This may be
  656. // used to include empty fields in Patch requests.
  657. ForceSendFields []string `json:"-"`
  658. // NullFields is a list of field names (e.g. "Elections") to include in
  659. // API requests with the JSON null value. By default, fields with empty
  660. // values are omitted from API requests. However, any field with an
  661. // empty value appearing in NullFields will be sent to the server as
  662. // null. It is an error if a field in this list has a non-empty value.
  663. // This may be used to include null fields in Patch requests.
  664. NullFields []string `json:"-"`
  665. }
  666. func (s *ElectionsQueryResponse) MarshalJSON() ([]byte, error) {
  667. type NoMethod ElectionsQueryResponse
  668. raw := NoMethod(*s)
  669. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  670. }
  671. // ElectoralDistrict: Describes the geographic scope of a contest.
  672. type ElectoralDistrict struct {
  673. // Id: An identifier for this district, relative to its scope. For
  674. // example, the 34th State Senate district would have id "34" and a
  675. // scope of stateUpper.
  676. Id string `json:"id,omitempty"`
  677. KgForeignKey string `json:"kgForeignKey,omitempty"`
  678. // Name: The name of the district.
  679. Name string `json:"name,omitempty"`
  680. // Scope: The geographic scope of this district. If unspecified the
  681. // district's geography is not known. One of: national, statewide,
  682. // congressional, stateUpper, stateLower, countywide, judicial,
  683. // schoolBoard, cityWide, township, countyCouncil, cityCouncil, ward,
  684. // special
  685. Scope string `json:"scope,omitempty"`
  686. // ForceSendFields is a list of field names (e.g. "Id") to
  687. // unconditionally include in API requests. By default, fields with
  688. // empty values are omitted from API requests. However, any non-pointer,
  689. // non-interface field appearing in ForceSendFields will be sent to the
  690. // server regardless of whether the field is empty or not. This may be
  691. // used to include empty fields in Patch requests.
  692. ForceSendFields []string `json:"-"`
  693. // NullFields is a list of field names (e.g. "Id") to include in API
  694. // requests with the JSON null value. By default, fields with empty
  695. // values are omitted from API requests. However, any field with an
  696. // empty value appearing in NullFields will be sent to the server as
  697. // null. It is an error if a field in this list has a non-empty value.
  698. // This may be used to include null fields in Patch requests.
  699. NullFields []string `json:"-"`
  700. }
  701. func (s *ElectoralDistrict) MarshalJSON() ([]byte, error) {
  702. type NoMethod ElectoralDistrict
  703. raw := NoMethod(*s)
  704. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  705. }
  706. type FieldMetadataProto struct {
  707. Internal *InternalFieldMetadataProto `json:"internal,omitempty"`
  708. // ForceSendFields is a list of field names (e.g. "Internal") to
  709. // unconditionally include in API requests. By default, fields with
  710. // empty values are omitted from API requests. However, any non-pointer,
  711. // non-interface field appearing in ForceSendFields will be sent to the
  712. // server regardless of whether the field is empty or not. This may be
  713. // used to include empty fields in Patch requests.
  714. ForceSendFields []string `json:"-"`
  715. // NullFields is a list of field names (e.g. "Internal") to include in
  716. // API requests with the JSON null value. By default, fields with empty
  717. // values are omitted from API requests. However, any field with an
  718. // empty value appearing in NullFields will be sent to the server as
  719. // null. It is an error if a field in this list has a non-empty value.
  720. // This may be used to include null fields in Patch requests.
  721. NullFields []string `json:"-"`
  722. }
  723. func (s *FieldMetadataProto) MarshalJSON() ([]byte, error) {
  724. type NoMethod FieldMetadataProto
  725. raw := NoMethod(*s)
  726. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  727. }
  728. // GeographicDivision: Describes a political geography.
  729. type GeographicDivision struct {
  730. // AlsoKnownAs: Any other valid OCD IDs that refer to the same
  731. // division.
  732. //
  733. // Because OCD IDs are meant to be human-readable and at least somewhat
  734. // predictable, there are occasionally several identifiers for a single
  735. // division. These identifiers are defined to be equivalent to one
  736. // another, and one is always indicated as the primary identifier. The
  737. // primary identifier will be returned in ocd_id above, and any other
  738. // equivalent valid identifiers will be returned in this list.
  739. //
  740. // For example, if this division's OCD ID is
  741. // ocd-division/country:us/district:dc, this will contain
  742. // ocd-division/country:us/state:dc.
  743. AlsoKnownAs []string `json:"alsoKnownAs,omitempty"`
  744. // Name: The name of the division.
  745. Name string `json:"name,omitempty"`
  746. // OfficeIndices: List of indices in the offices array, one for each
  747. // office elected from this division. Will only be present if
  748. // includeOffices was true (or absent) in the request.
  749. OfficeIndices []int64 `json:"officeIndices,omitempty"`
  750. // ForceSendFields is a list of field names (e.g. "AlsoKnownAs") to
  751. // unconditionally include in API requests. By default, fields with
  752. // empty values are omitted from API requests. However, any non-pointer,
  753. // non-interface field appearing in ForceSendFields will be sent to the
  754. // server regardless of whether the field is empty or not. This may be
  755. // used to include empty fields in Patch requests.
  756. ForceSendFields []string `json:"-"`
  757. // NullFields is a list of field names (e.g. "AlsoKnownAs") to include
  758. // in API requests with the JSON null value. By default, fields with
  759. // empty values are omitted from API requests. However, any field with
  760. // an empty value appearing in NullFields will be sent to the server as
  761. // null. It is an error if a field in this list has a non-empty value.
  762. // This may be used to include null fields in Patch requests.
  763. NullFields []string `json:"-"`
  764. }
  765. func (s *GeographicDivision) MarshalJSON() ([]byte, error) {
  766. type NoMethod GeographicDivision
  767. raw := NoMethod(*s)
  768. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  769. }
  770. type InternalFieldMetadataProto struct {
  771. IsAuto bool `json:"isAuto,omitempty"`
  772. SourceSummary *InternalSourceSummaryProto `json:"sourceSummary,omitempty"`
  773. // ForceSendFields is a list of field names (e.g. "IsAuto") to
  774. // unconditionally include in API requests. By default, fields with
  775. // empty values are omitted from API requests. However, any non-pointer,
  776. // non-interface field appearing in ForceSendFields will be sent to the
  777. // server regardless of whether the field is empty or not. This may be
  778. // used to include empty fields in Patch requests.
  779. ForceSendFields []string `json:"-"`
  780. // NullFields is a list of field names (e.g. "IsAuto") to include in API
  781. // requests with the JSON null value. By default, fields with empty
  782. // values are omitted from API requests. However, any field with an
  783. // empty value appearing in NullFields will be sent to the server as
  784. // null. It is an error if a field in this list has a non-empty value.
  785. // This may be used to include null fields in Patch requests.
  786. NullFields []string `json:"-"`
  787. }
  788. func (s *InternalFieldMetadataProto) MarshalJSON() ([]byte, error) {
  789. type NoMethod InternalFieldMetadataProto
  790. raw := NoMethod(*s)
  791. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  792. }
  793. type InternalSourceSummaryProto struct {
  794. Dataset string `json:"dataset,omitempty"`
  795. Provider string `json:"provider,omitempty"`
  796. // ForceSendFields is a list of field names (e.g. "Dataset") to
  797. // unconditionally include in API requests. By default, fields with
  798. // empty values are omitted from API requests. However, any non-pointer,
  799. // non-interface field appearing in ForceSendFields will be sent to the
  800. // server regardless of whether the field is empty or not. This may be
  801. // used to include empty fields in Patch requests.
  802. ForceSendFields []string `json:"-"`
  803. // NullFields is a list of field names (e.g. "Dataset") to include in
  804. // API requests with the JSON null value. By default, fields with empty
  805. // values are omitted from API requests. However, any field with an
  806. // empty value appearing in NullFields will be sent to the server as
  807. // null. It is an error if a field in this list has a non-empty value.
  808. // This may be used to include null fields in Patch requests.
  809. NullFields []string `json:"-"`
  810. }
  811. func (s *InternalSourceSummaryProto) MarshalJSON() ([]byte, error) {
  812. type NoMethod InternalSourceSummaryProto
  813. raw := NoMethod(*s)
  814. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  815. }
  816. type LivegraphBacktraceRecordInfo struct {
  817. DataSourcePublishMsec int64 `json:"dataSourcePublishMsec,omitempty,string"`
  818. ExpId string `json:"expId,omitempty"`
  819. ExpInfo *LivegraphBacktraceRecordInfoExpInfo `json:"expInfo,omitempty"`
  820. IsRecon bool `json:"isRecon,omitempty"`
  821. IsWlmThrottled bool `json:"isWlmThrottled,omitempty"`
  822. NumberOfTriples int64 `json:"numberOfTriples,omitempty,string"`
  823. Priority string `json:"priority,omitempty"`
  824. Process string `json:"process,omitempty"`
  825. ProxyReceiveMsec int64 `json:"proxyReceiveMsec,omitempty,string"`
  826. ProxySentMsec int64 `json:"proxySentMsec,omitempty,string"`
  827. RecordId string `json:"recordId,omitempty"`
  828. ShouldMonitorLatency bool `json:"shouldMonitorLatency,omitempty"`
  829. SubscriberReceiveMsec int64 `json:"subscriberReceiveMsec,omitempty,string"`
  830. TopicBuildFinishMsec int64 `json:"topicBuildFinishMsec,omitempty,string"`
  831. TopicBuildStartMsec int64 `json:"topicBuildStartMsec,omitempty,string"`
  832. Version string `json:"version,omitempty"`
  833. // ForceSendFields is a list of field names (e.g.
  834. // "DataSourcePublishMsec") to unconditionally include in API requests.
  835. // By default, fields with empty values are omitted from API requests.
  836. // However, any non-pointer, non-interface field appearing in
  837. // ForceSendFields will be sent to the server regardless of whether the
  838. // field is empty or not. This may be used to include empty fields in
  839. // Patch requests.
  840. ForceSendFields []string `json:"-"`
  841. // NullFields is a list of field names (e.g. "DataSourcePublishMsec") to
  842. // include in API requests with the JSON null value. By default, fields
  843. // with empty values are omitted from API requests. However, any field
  844. // with an empty value appearing in NullFields will be sent to the
  845. // server as null. It is an error if a field in this list has a
  846. // non-empty value. This may be used to include null fields in Patch
  847. // requests.
  848. NullFields []string `json:"-"`
  849. }
  850. func (s *LivegraphBacktraceRecordInfo) MarshalJSON() ([]byte, error) {
  851. type NoMethod LivegraphBacktraceRecordInfo
  852. raw := NoMethod(*s)
  853. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  854. }
  855. type LivegraphBacktraceRecordInfoExpInfo struct {
  856. DeletedIns []string `json:"deletedIns,omitempty"`
  857. // ForceSendFields is a list of field names (e.g. "DeletedIns") to
  858. // unconditionally include in API requests. By default, fields with
  859. // empty values are omitted from API requests. However, any non-pointer,
  860. // non-interface field appearing in ForceSendFields will be sent to the
  861. // server regardless of whether the field is empty or not. This may be
  862. // used to include empty fields in Patch requests.
  863. ForceSendFields []string `json:"-"`
  864. // NullFields is a list of field names (e.g. "DeletedIns") to include in
  865. // API requests with the JSON null value. By default, fields with empty
  866. // values are omitted from API requests. However, any field with an
  867. // empty value appearing in NullFields will be sent to the server as
  868. // null. It is an error if a field in this list has a non-empty value.
  869. // This may be used to include null fields in Patch requests.
  870. NullFields []string `json:"-"`
  871. }
  872. func (s *LivegraphBacktraceRecordInfoExpInfo) MarshalJSON() ([]byte, error) {
  873. type NoMethod LivegraphBacktraceRecordInfoExpInfo
  874. raw := NoMethod(*s)
  875. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  876. }
  877. type MessageSet struct {
  878. RecordMessageSetExt *LivegraphBacktraceRecordInfo `json:"recordMessageSetExt,omitempty"`
  879. // ForceSendFields is a list of field names (e.g. "RecordMessageSetExt")
  880. // to unconditionally include in API requests. By default, fields with
  881. // empty values are omitted from API requests. However, any non-pointer,
  882. // non-interface field appearing in ForceSendFields will be sent to the
  883. // server regardless of whether the field is empty or not. This may be
  884. // used to include empty fields in Patch requests.
  885. ForceSendFields []string `json:"-"`
  886. // NullFields is a list of field names (e.g. "RecordMessageSetExt") to
  887. // include in API requests with the JSON null value. By default, fields
  888. // with empty values are omitted from API requests. However, any field
  889. // with an empty value appearing in NullFields will be sent to the
  890. // server as null. It is an error if a field in this list has a
  891. // non-empty value. This may be used to include null fields in Patch
  892. // requests.
  893. NullFields []string `json:"-"`
  894. }
  895. func (s *MessageSet) MarshalJSON() ([]byte, error) {
  896. type NoMethod MessageSet
  897. raw := NoMethod(*s)
  898. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  899. }
  900. // Office: Information about an Office held by one or more Officials.
  901. type Office struct {
  902. // DivisionId: The OCD ID of the division with which this office is
  903. // associated.
  904. DivisionId string `json:"divisionId,omitempty"`
  905. // Levels: The levels of government of which this office is part. There
  906. // may be more than one in cases where a jurisdiction effectively acts
  907. // at two different levels of government; for example, the mayor of the
  908. // District of Columbia acts at "locality" level, but also effectively
  909. // at both "administrative-area-2" and "administrative-area-1".
  910. Levels []string `json:"levels,omitempty"`
  911. // Name: The human-readable name of the office.
  912. Name string `json:"name,omitempty"`
  913. // OfficialIndices: List of indices in the officials array of people who
  914. // presently hold this office.
  915. OfficialIndices []int64 `json:"officialIndices,omitempty"`
  916. // Roles: The roles which this office fulfills. Roles are not meant to
  917. // be exhaustive, or to exactly specify the entire set of
  918. // responsibilities of a given office, but are meant to be rough
  919. // categories that are useful for general selection from or sorting of a
  920. // list of offices.
  921. Roles []string `json:"roles,omitempty"`
  922. // Sources: A list of sources for this office. If multiple sources are
  923. // listed, the data has been aggregated from those sources.
  924. Sources []*Source `json:"sources,omitempty"`
  925. // ForceSendFields is a list of field names (e.g. "DivisionId") to
  926. // unconditionally include in API requests. By default, fields with
  927. // empty values are omitted from API requests. However, any non-pointer,
  928. // non-interface field appearing in ForceSendFields will be sent to the
  929. // server regardless of whether the field is empty or not. This may be
  930. // used to include empty fields in Patch requests.
  931. ForceSendFields []string `json:"-"`
  932. // NullFields is a list of field names (e.g. "DivisionId") to include in
  933. // API requests with the JSON null value. By default, fields with empty
  934. // values are omitted from API requests. However, any field with an
  935. // empty value appearing in NullFields will be sent to the server as
  936. // null. It is an error if a field in this list has a non-empty value.
  937. // This may be used to include null fields in Patch requests.
  938. NullFields []string `json:"-"`
  939. }
  940. func (s *Office) MarshalJSON() ([]byte, error) {
  941. type NoMethod Office
  942. raw := NoMethod(*s)
  943. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  944. }
  945. // Official: Information about a person holding an elected office.
  946. type Official struct {
  947. // Address: Addresses at which to contact the official.
  948. Address []*SimpleAddressType `json:"address,omitempty"`
  949. // Channels: A list of known (social) media channels for this official.
  950. Channels []*Channel `json:"channels,omitempty"`
  951. // Emails: The direct email addresses for the official.
  952. Emails []string `json:"emails,omitempty"`
  953. // Name: The official's name.
  954. Name string `json:"name,omitempty"`
  955. // Party: The full name of the party the official belongs to.
  956. Party string `json:"party,omitempty"`
  957. // Phones: The official's public contact phone numbers.
  958. Phones []string `json:"phones,omitempty"`
  959. // PhotoUrl: A URL for a photo of the official.
  960. PhotoUrl string `json:"photoUrl,omitempty"`
  961. // Urls: The official's public website URLs.
  962. Urls []string `json:"urls,omitempty"`
  963. // ForceSendFields is a list of field names (e.g. "Address") to
  964. // unconditionally include in API requests. By default, fields with
  965. // empty values are omitted from API requests. However, any non-pointer,
  966. // non-interface field appearing in ForceSendFields will be sent to the
  967. // server regardless of whether the field is empty or not. This may be
  968. // used to include empty fields in Patch requests.
  969. ForceSendFields []string `json:"-"`
  970. // NullFields is a list of field names (e.g. "Address") to include in
  971. // API requests with the JSON null value. By default, fields with empty
  972. // values are omitted from API requests. However, any field with an
  973. // empty value appearing in NullFields will be sent to the server as
  974. // null. It is an error if a field in this list has a non-empty value.
  975. // This may be used to include null fields in Patch requests.
  976. NullFields []string `json:"-"`
  977. }
  978. func (s *Official) MarshalJSON() ([]byte, error) {
  979. type NoMethod Official
  980. raw := NoMethod(*s)
  981. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  982. }
  983. type PointProto struct {
  984. LatE7 int64 `json:"latE7,omitempty"`
  985. LngE7 int64 `json:"lngE7,omitempty"`
  986. Metadata *FieldMetadataProto `json:"metadata,omitempty"`
  987. TemporaryData *MessageSet `json:"temporaryData,omitempty"`
  988. // ForceSendFields is a list of field names (e.g. "LatE7") to
  989. // unconditionally include in API requests. By default, fields with
  990. // empty values are omitted from API requests. However, any non-pointer,
  991. // non-interface field appearing in ForceSendFields will be sent to the
  992. // server regardless of whether the field is empty or not. This may be
  993. // used to include empty fields in Patch requests.
  994. ForceSendFields []string `json:"-"`
  995. // NullFields is a list of field names (e.g. "LatE7") to include in API
  996. // requests with the JSON null value. By default, fields with empty
  997. // values are omitted from API requests. However, any field with an
  998. // empty value appearing in NullFields will be sent to the server as
  999. // null. It is an error if a field in this list has a non-empty value.
  1000. // This may be used to include null fields in Patch requests.
  1001. NullFields []string `json:"-"`
  1002. }
  1003. func (s *PointProto) MarshalJSON() ([]byte, error) {
  1004. type NoMethod PointProto
  1005. raw := NoMethod(*s)
  1006. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1007. }
  1008. // PollingLocation: A location where a voter can vote. This may be an
  1009. // early vote site, an election day voting location, or a drop off
  1010. // location for a completed ballot.
  1011. type PollingLocation struct {
  1012. // Address: The address of the location.
  1013. Address *SimpleAddressType `json:"address,omitempty"`
  1014. // EndDate: The last date that this early vote site or drop off location
  1015. // may be used. This field is not populated for polling locations.
  1016. EndDate string `json:"endDate,omitempty"`
  1017. // Id: An ID for this object. IDs may change in future requests and
  1018. // should not be cached. Access to this field requires special access
  1019. // that can be requested from the Request more link on the Quotas page.
  1020. Id string `json:"id,omitempty"`
  1021. // Latitude: Latitude of the location, in degrees north of the equator.
  1022. // Only some locations -- generally, ballot drop boxes for vote-by-mail
  1023. // elections -- will have this set; for others, use a geocoding service
  1024. // like the Google Maps API to resolve the address to a geographic
  1025. // point.
  1026. Latitude float64 `json:"latitude,omitempty"`
  1027. // Longitude: Longitude of the location, in degrees east of the Prime
  1028. // Meridian. Only some locations -- generally, ballot drop boxes for
  1029. // vote-by-mail elections -- will have this set; for others, use a
  1030. // geocoding service like the Google Maps API to resolve the address to
  1031. // a geographic point.
  1032. Longitude float64 `json:"longitude,omitempty"`
  1033. // Name: The name of the early vote site or drop off location. This
  1034. // field is not populated for polling locations.
  1035. Name string `json:"name,omitempty"`
  1036. // Notes: Notes about this location (e.g. accessibility ramp or entrance
  1037. // to use).
  1038. Notes string `json:"notes,omitempty"`
  1039. // PollingHours: A description of when this location is open.
  1040. PollingHours string `json:"pollingHours,omitempty"`
  1041. // Sources: A list of sources for this location. If multiple sources are
  1042. // listed the data has been aggregated from those sources.
  1043. Sources []*Source `json:"sources,omitempty"`
  1044. // StartDate: The first date that this early vote site or drop off
  1045. // location may be used. This field is not populated for polling
  1046. // locations.
  1047. StartDate string `json:"startDate,omitempty"`
  1048. // VoterServices: The services provided by this early vote site or drop
  1049. // off location. This field is not populated for polling locations.
  1050. VoterServices string `json:"voterServices,omitempty"`
  1051. // ForceSendFields is a list of field names (e.g. "Address") to
  1052. // unconditionally include in API requests. By default, fields with
  1053. // empty values are omitted from API requests. However, any non-pointer,
  1054. // non-interface field appearing in ForceSendFields will be sent to the
  1055. // server regardless of whether the field is empty or not. This may be
  1056. // used to include empty fields in Patch requests.
  1057. ForceSendFields []string `json:"-"`
  1058. // NullFields is a list of field names (e.g. "Address") to include in
  1059. // API requests with the JSON null value. By default, fields with empty
  1060. // values are omitted from API requests. However, any field with an
  1061. // empty value appearing in NullFields will be sent to the server as
  1062. // null. It is an error if a field in this list has a non-empty value.
  1063. // This may be used to include null fields in Patch requests.
  1064. NullFields []string `json:"-"`
  1065. }
  1066. func (s *PollingLocation) MarshalJSON() ([]byte, error) {
  1067. type NoMethod PollingLocation
  1068. raw := NoMethod(*s)
  1069. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1070. }
  1071. func (s *PollingLocation) UnmarshalJSON(data []byte) error {
  1072. type NoMethod PollingLocation
  1073. var s1 struct {
  1074. Latitude gensupport.JSONFloat64 `json:"latitude"`
  1075. Longitude gensupport.JSONFloat64 `json:"longitude"`
  1076. *NoMethod
  1077. }
  1078. s1.NoMethod = (*NoMethod)(s)
  1079. if err := json.Unmarshal(data, &s1); err != nil {
  1080. return err
  1081. }
  1082. s.Latitude = float64(s1.Latitude)
  1083. s.Longitude = float64(s1.Longitude)
  1084. return nil
  1085. }
  1086. type PostalAddress struct {
  1087. AddressLines []string `json:"addressLines,omitempty"`
  1088. AdministrativeAreaName string `json:"administrativeAreaName,omitempty"`
  1089. CountryName string `json:"countryName,omitempty"`
  1090. CountryNameCode string `json:"countryNameCode,omitempty"`
  1091. DependentLocalityName string `json:"dependentLocalityName,omitempty"`
  1092. DependentThoroughfareName string `json:"dependentThoroughfareName,omitempty"`
  1093. FirmName string `json:"firmName,omitempty"`
  1094. IsDisputed bool `json:"isDisputed,omitempty"`
  1095. LanguageCode string `json:"languageCode,omitempty"`
  1096. LocalityName string `json:"localityName,omitempty"`
  1097. PostBoxNumber string `json:"postBoxNumber,omitempty"`
  1098. PostalCodeNumber string `json:"postalCodeNumber,omitempty"`
  1099. PostalCodeNumberExtension string `json:"postalCodeNumberExtension,omitempty"`
  1100. PremiseName string `json:"premiseName,omitempty"`
  1101. RecipientName string `json:"recipientName,omitempty"`
  1102. SortingCode string `json:"sortingCode,omitempty"`
  1103. SubAdministrativeAreaName string `json:"subAdministrativeAreaName,omitempty"`
  1104. SubPremiseName string `json:"subPremiseName,omitempty"`
  1105. ThoroughfareName string `json:"thoroughfareName,omitempty"`
  1106. ThoroughfareNumber string `json:"thoroughfareNumber,omitempty"`
  1107. // ForceSendFields is a list of field names (e.g. "AddressLines") to
  1108. // unconditionally include in API requests. By default, fields with
  1109. // empty values are omitted from API requests. However, any non-pointer,
  1110. // non-interface field appearing in ForceSendFields will be sent to the
  1111. // server regardless of whether the field is empty or not. This may be
  1112. // used to include empty fields in Patch requests.
  1113. ForceSendFields []string `json:"-"`
  1114. // NullFields is a list of field names (e.g. "AddressLines") to include
  1115. // in API requests with the JSON null value. By default, fields with
  1116. // empty values are omitted from API requests. However, any field with
  1117. // an empty value appearing in NullFields will be sent to the server as
  1118. // null. It is an error if a field in this list has a non-empty value.
  1119. // This may be used to include null fields in Patch requests.
  1120. NullFields []string `json:"-"`
  1121. }
  1122. func (s *PostalAddress) MarshalJSON() ([]byte, error) {
  1123. type NoMethod PostalAddress
  1124. raw := NoMethod(*s)
  1125. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1126. }
  1127. type Provenance struct {
  1128. CollidedSegmentSource *StreetSegmentList `json:"collidedSegmentSource,omitempty"`
  1129. CtclContestUuid string `json:"ctclContestUuid,omitempty"`
  1130. CtclOfficeUuid string `json:"ctclOfficeUuid,omitempty"`
  1131. DatasetId int64 `json:"datasetId,omitempty,string"`
  1132. PrecinctId int64 `json:"precinctId,omitempty,string"`
  1133. PrecinctSplitId int64 `json:"precinctSplitId,omitempty,string"`
  1134. TsStreetSegmentId string `json:"tsStreetSegmentId,omitempty"`
  1135. Vip5PrecinctId string `json:"vip5PrecinctId,omitempty"`
  1136. Vip5StreetSegmentId string `json:"vip5StreetSegmentId,omitempty"`
  1137. VipStreetSegmentId int64 `json:"vipStreetSegmentId,omitempty,string"`
  1138. // ForceSendFields is a list of field names (e.g.
  1139. // "CollidedSegmentSource") to unconditionally include in API requests.
  1140. // By default, fields with empty values are omitted from API requests.
  1141. // However, any non-pointer, non-interface field appearing in
  1142. // ForceSendFields will be sent to the server regardless of whether the
  1143. // field is empty or not. This may be used to include empty fields in
  1144. // Patch requests.
  1145. ForceSendFields []string `json:"-"`
  1146. // NullFields is a list of field names (e.g. "CollidedSegmentSource") to
  1147. // include in API requests with the JSON null value. By default, fields
  1148. // with empty values are omitted from API requests. However, any field
  1149. // with an empty value appearing in NullFields will be sent to the
  1150. // server as null. It is an error if a field in this list has a
  1151. // non-empty value. This may be used to include null fields in Patch
  1152. // requests.
  1153. NullFields []string `json:"-"`
  1154. }
  1155. func (s *Provenance) MarshalJSON() ([]byte, error) {
  1156. type NoMethod Provenance
  1157. raw := NoMethod(*s)
  1158. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1159. }
  1160. type RepresentativeInfoData struct {
  1161. // Divisions: Political geographic divisions that contain the requested
  1162. // address.
  1163. Divisions map[string]GeographicDivision `json:"divisions,omitempty"`
  1164. // Offices: Elected offices referenced by the divisions listed above.
  1165. // Will only be present if includeOffices was true in the request.
  1166. Offices []*Office `json:"offices,omitempty"`
  1167. // Officials: Officials holding the offices listed above. Will only be
  1168. // present if includeOffices was true in the request.
  1169. Officials []*Official `json:"officials,omitempty"`
  1170. // ServerResponse contains the HTTP response code and headers from the
  1171. // server.
  1172. googleapi.ServerResponse `json:"-"`
  1173. // ForceSendFields is a list of field names (e.g. "Divisions") to
  1174. // unconditionally include in API requests. By default, fields with
  1175. // empty values are omitted from API requests. However, any non-pointer,
  1176. // non-interface field appearing in ForceSendFields will be sent to the
  1177. // server regardless of whether the field is empty or not. This may be
  1178. // used to include empty fields in Patch requests.
  1179. ForceSendFields []string `json:"-"`
  1180. // NullFields is a list of field names (e.g. "Divisions") to include in
  1181. // API requests with the JSON null value. By default, fields with empty
  1182. // values are omitted from API requests. However, any field with an
  1183. // empty value appearing in NullFields will be sent to the server as
  1184. // null. It is an error if a field in this list has a non-empty value.
  1185. // This may be used to include null fields in Patch requests.
  1186. NullFields []string `json:"-"`
  1187. }
  1188. func (s *RepresentativeInfoData) MarshalJSON() ([]byte, error) {
  1189. type NoMethod RepresentativeInfoData
  1190. raw := NoMethod(*s)
  1191. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1192. }
  1193. // RepresentativeInfoRequest: A request for political geography and
  1194. // representative information for an address.
  1195. type RepresentativeInfoRequest struct {
  1196. ContextParams *ContextParams `json:"contextParams,omitempty"`
  1197. // ForceSendFields is a list of field names (e.g. "ContextParams") to
  1198. // unconditionally include in API requests. By default, fields with
  1199. // empty values are omitted from API requests. However, any non-pointer,
  1200. // non-interface field appearing in ForceSendFields will be sent to the
  1201. // server regardless of whether the field is empty or not. This may be
  1202. // used to include empty fields in Patch requests.
  1203. ForceSendFields []string `json:"-"`
  1204. // NullFields is a list of field names (e.g. "ContextParams") to include
  1205. // in API requests with the JSON null value. By default, fields with
  1206. // empty values are omitted from API requests. However, any field with
  1207. // an empty value appearing in NullFields will be sent to the server as
  1208. // null. It is an error if a field in this list has a non-empty value.
  1209. // This may be used to include null fields in Patch requests.
  1210. NullFields []string `json:"-"`
  1211. }
  1212. func (s *RepresentativeInfoRequest) MarshalJSON() ([]byte, error) {
  1213. type NoMethod RepresentativeInfoRequest
  1214. raw := NoMethod(*s)
  1215. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1216. }
  1217. // RepresentativeInfoResponse: The result of a representative info
  1218. // lookup query.
  1219. type RepresentativeInfoResponse struct {
  1220. // Divisions: Political geographic divisions that contain the requested
  1221. // address.
  1222. Divisions map[string]GeographicDivision `json:"divisions,omitempty"`
  1223. // Kind: Identifies what kind of resource this is. Value: the fixed
  1224. // string "civicinfo#representativeInfoResponse".
  1225. Kind string `json:"kind,omitempty"`
  1226. // NormalizedInput: The normalized version of the requested address
  1227. NormalizedInput *SimpleAddressType `json:"normalizedInput,omitempty"`
  1228. // Offices: Elected offices referenced by the divisions listed above.
  1229. // Will only be present if includeOffices was true in the request.
  1230. Offices []*Office `json:"offices,omitempty"`
  1231. // Officials: Officials holding the offices listed above. Will only be
  1232. // present if includeOffices was true in the request.
  1233. Officials []*Official `json:"officials,omitempty"`
  1234. // ServerResponse contains the HTTP response code and headers from the
  1235. // server.
  1236. googleapi.ServerResponse `json:"-"`
  1237. // ForceSendFields is a list of field names (e.g. "Divisions") to
  1238. // unconditionally include in API requests. By default, fields with
  1239. // empty values are omitted from API requests. However, any non-pointer,
  1240. // non-interface field appearing in ForceSendFields will be sent to the
  1241. // server regardless of whether the field is empty or not. This may be
  1242. // used to include empty fields in Patch requests.
  1243. ForceSendFields []string `json:"-"`
  1244. // NullFields is a list of field names (e.g. "Divisions") to include in
  1245. // API requests with the JSON null value. By default, fields with empty
  1246. // values are omitted from API requests. However, any field with an
  1247. // empty value appearing in NullFields will be sent to the server as
  1248. // null. It is an error if a field in this list has a non-empty value.
  1249. // This may be used to include null fields in Patch requests.
  1250. NullFields []string `json:"-"`
  1251. }
  1252. func (s *RepresentativeInfoResponse) MarshalJSON() ([]byte, error) {
  1253. type NoMethod RepresentativeInfoResponse
  1254. raw := NoMethod(*s)
  1255. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1256. }
  1257. // SimpleAddressType: A simple representation of an address.
  1258. type SimpleAddressType struct {
  1259. // City: The city or town for the address.
  1260. City string `json:"city,omitempty"`
  1261. // Line1: The street name and number of this address.
  1262. Line1 string `json:"line1,omitempty"`
  1263. // Line2: The second line the address, if needed.
  1264. Line2 string `json:"line2,omitempty"`
  1265. // Line3: The third line of the address, if needed.
  1266. Line3 string `json:"line3,omitempty"`
  1267. // LocationName: The name of the location.
  1268. LocationName string `json:"locationName,omitempty"`
  1269. // State: The US two letter state abbreviation of the address.
  1270. State string `json:"state,omitempty"`
  1271. // Zip: The US Postal Zip Code of the address.
  1272. Zip string `json:"zip,omitempty"`
  1273. // ForceSendFields is a list of field names (e.g. "City") to
  1274. // unconditionally include in API requests. By default, fields with
  1275. // empty values are omitted from API requests. However, any non-pointer,
  1276. // non-interface field appearing in ForceSendFields will be sent to the
  1277. // server regardless of whether the field is empty or not. This may be
  1278. // used to include empty fields in Patch requests.
  1279. ForceSendFields []string `json:"-"`
  1280. // NullFields is a list of field names (e.g. "City") to include in API
  1281. // requests with the JSON null value. By default, fields with empty
  1282. // values are omitted from API requests. However, any field with an
  1283. // empty value appearing in NullFields will be sent to the server as
  1284. // null. It is an error if a field in this list has a non-empty value.
  1285. // This may be used to include null fields in Patch requests.
  1286. NullFields []string `json:"-"`
  1287. }
  1288. func (s *SimpleAddressType) MarshalJSON() ([]byte, error) {
  1289. type NoMethod SimpleAddressType
  1290. raw := NoMethod(*s)
  1291. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1292. }
  1293. // Source: Contains information about the data source for the element
  1294. // containing it.
  1295. type Source struct {
  1296. // Name: The name of the data source.
  1297. Name string `json:"name,omitempty"`
  1298. // Official: Whether this data comes from an official government source.
  1299. Official bool `json:"official,omitempty"`
  1300. // ForceSendFields is a list of field names (e.g. "Name") to
  1301. // unconditionally include in API requests. By default, fields with
  1302. // empty values are omitted from API requests. However, any non-pointer,
  1303. // non-interface field appearing in ForceSendFields will be sent to the
  1304. // server regardless of whether the field is empty or not. This may be
  1305. // used to include empty fields in Patch requests.
  1306. ForceSendFields []string `json:"-"`
  1307. // NullFields is a list of field names (e.g. "Name") to include in API
  1308. // requests with the JSON null value. By default, fields with empty
  1309. // values are omitted from API requests. However, any field with an
  1310. // empty value appearing in NullFields will be sent to the server as
  1311. // null. It is an error if a field in this list has a non-empty value.
  1312. // This may be used to include null fields in Patch requests.
  1313. NullFields []string `json:"-"`
  1314. }
  1315. func (s *Source) MarshalJSON() ([]byte, error) {
  1316. type NoMethod Source
  1317. raw := NoMethod(*s)
  1318. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1319. }
  1320. type StreetSegment struct {
  1321. AdministrationRegionIds []string `json:"administrationRegionIds,omitempty"`
  1322. BeforeGeocodeId string `json:"beforeGeocodeId,omitempty"`
  1323. CatalistUniquePrecinctCode string `json:"catalistUniquePrecinctCode,omitempty"`
  1324. City string `json:"city,omitempty"`
  1325. CityCouncilDistrict string `json:"cityCouncilDistrict,omitempty"`
  1326. CongressionalDistrict string `json:"congressionalDistrict,omitempty"`
  1327. ContestIds []string `json:"contestIds,omitempty"`
  1328. CountyCouncilDistrict string `json:"countyCouncilDistrict,omitempty"`
  1329. CountyFips string `json:"countyFips,omitempty"`
  1330. DatasetId int64 `json:"datasetId,omitempty,string"`
  1331. EarlyVoteSiteByIds []string `json:"earlyVoteSiteByIds,omitempty"`
  1332. EndHouseNumber int64 `json:"endHouseNumber,omitempty,string"`
  1333. GeocodedPoint *PointProto `json:"geocodedPoint,omitempty"`
  1334. GeographicDivisionOcdIds []string `json:"geographicDivisionOcdIds,omitempty"`
  1335. Id string `json:"id,omitempty"`
  1336. JudicialDistrict string `json:"judicialDistrict,omitempty"`
  1337. MailOnly bool `json:"mailOnly,omitempty"`
  1338. MunicipalDistrict string `json:"municipalDistrict,omitempty"`
  1339. NcoaAddress string `json:"ncoaAddress,omitempty"`
  1340. OddOrEvens []string `json:"oddOrEvens,omitempty"`
  1341. OriginalId string `json:"originalId,omitempty"`
  1342. PollinglocationByIds []string `json:"pollinglocationByIds,omitempty"`
  1343. PrecinctName string `json:"precinctName,omitempty"`
  1344. PrecinctOcdId string `json:"precinctOcdId,omitempty"`
  1345. Provenances []*Provenance `json:"provenances,omitempty"`
  1346. Published bool `json:"published,omitempty"`
  1347. SchoolDistrict string `json:"schoolDistrict,omitempty"`
  1348. StartHouseNumber int64 `json:"startHouseNumber,omitempty,string"`
  1349. StartLatE7 int64 `json:"startLatE7,omitempty,string"`
  1350. StartLngE7 int64 `json:"startLngE7,omitempty,string"`
  1351. State string `json:"state,omitempty"`
  1352. StateHouseDistrict string `json:"stateHouseDistrict,omitempty"`
  1353. StateSenateDistrict string `json:"stateSenateDistrict,omitempty"`
  1354. StreetName string `json:"streetName,omitempty"`
  1355. SubAdministrativeAreaName string `json:"subAdministrativeAreaName,omitempty"`
  1356. SurrogateId int64 `json:"surrogateId,omitempty,string"`
  1357. TargetsmartUniquePrecinctCode string `json:"targetsmartUniquePrecinctCode,omitempty"`
  1358. TownshipDistrict string `json:"townshipDistrict,omitempty"`
  1359. UnitNumber string `json:"unitNumber,omitempty"`
  1360. UnitType string `json:"unitType,omitempty"`
  1361. VanPrecinctCode string `json:"vanPrecinctCode,omitempty"`
  1362. VoterGeographicDivisionOcdIds []string `json:"voterGeographicDivisionOcdIds,omitempty"`
  1363. WardDistrict string `json:"wardDistrict,omitempty"`
  1364. Wildcard bool `json:"wildcard,omitempty"`
  1365. Zip string `json:"zip,omitempty"`
  1366. // ForceSendFields is a list of field names (e.g.
  1367. // "AdministrationRegionIds") to unconditionally include in API
  1368. // requests. By default, fields with empty values are omitted from API
  1369. // requests. However, any non-pointer, non-interface field appearing in
  1370. // ForceSendFields will be sent to the server regardless of whether the
  1371. // field is empty or not. This may be used to include empty fields in
  1372. // Patch requests.
  1373. ForceSendFields []string `json:"-"`
  1374. // NullFields is a list of field names (e.g. "AdministrationRegionIds")
  1375. // to include in API requests with the JSON null value. By default,
  1376. // fields with empty values are omitted from API requests. However, any
  1377. // field with an empty value appearing in NullFields will be sent to the
  1378. // server as null. It is an error if a field in this list has a
  1379. // non-empty value. This may be used to include null fields in Patch
  1380. // requests.
  1381. NullFields []string `json:"-"`
  1382. }
  1383. func (s *StreetSegment) MarshalJSON() ([]byte, error) {
  1384. type NoMethod StreetSegment
  1385. raw := NoMethod(*s)
  1386. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1387. }
  1388. type StreetSegmentList struct {
  1389. Segments []*StreetSegment `json:"segments,omitempty"`
  1390. // ForceSendFields is a list of field names (e.g. "Segments") to
  1391. // unconditionally include in API requests. By default, fields with
  1392. // empty values are omitted from API requests. However, any non-pointer,
  1393. // non-interface field appearing in ForceSendFields will be sent to the
  1394. // server regardless of whether the field is empty or not. This may be
  1395. // used to include empty fields in Patch requests.
  1396. ForceSendFields []string `json:"-"`
  1397. // NullFields is a list of field names (e.g. "Segments") to include in
  1398. // API requests with the JSON null value. By default, fields with empty
  1399. // values are omitted from API requests. However, any field with an
  1400. // empty value appearing in NullFields will be sent to the server as
  1401. // null. It is an error if a field in this list has a non-empty value.
  1402. // This may be used to include null fields in Patch requests.
  1403. NullFields []string `json:"-"`
  1404. }
  1405. func (s *StreetSegmentList) MarshalJSON() ([]byte, error) {
  1406. type NoMethod StreetSegmentList
  1407. raw := NoMethod(*s)
  1408. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1409. }
  1410. // VoterInfoRequest: A request for information about a voter.
  1411. type VoterInfoRequest struct {
  1412. ContextParams *ContextParams `json:"contextParams,omitempty"`
  1413. VoterInfoSegmentResult *VoterInfoSegmentResult `json:"voterInfoSegmentResult,omitempty"`
  1414. // ForceSendFields is a list of field names (e.g. "ContextParams") to
  1415. // unconditionally include in API requests. By default, fields with
  1416. // empty values are omitted from API requests. However, any non-pointer,
  1417. // non-interface field appearing in ForceSendFields will be sent to the
  1418. // server regardless of whether the field is empty or not. This may be
  1419. // used to include empty fields in Patch requests.
  1420. ForceSendFields []string `json:"-"`
  1421. // NullFields is a list of field names (e.g. "ContextParams") to include
  1422. // in API requests with the JSON null value. By default, fields with
  1423. // empty values are omitted from API requests. However, any field with
  1424. // an empty value appearing in NullFields will be sent to the server as
  1425. // null. It is an error if a field in this list has a non-empty value.
  1426. // This may be used to include null fields in Patch requests.
  1427. NullFields []string `json:"-"`
  1428. }
  1429. func (s *VoterInfoRequest) MarshalJSON() ([]byte, error) {
  1430. type NoMethod VoterInfoRequest
  1431. raw := NoMethod(*s)
  1432. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1433. }
  1434. // VoterInfoResponse: The result of a voter info lookup query.
  1435. type VoterInfoResponse struct {
  1436. // Contests: Contests that will appear on the voter's ballot.
  1437. Contests []*Contest `json:"contests,omitempty"`
  1438. // DropOffLocations: Locations where a voter is eligible to drop off a
  1439. // completed ballot. The voter must have received and completed a ballot
  1440. // prior to arriving at the location. The location may not have ballots
  1441. // available on the premises. These locations could be open on or before
  1442. // election day as indicated in the pollingHours field.
  1443. DropOffLocations []*PollingLocation `json:"dropOffLocations,omitempty"`
  1444. // EarlyVoteSites: Locations where the voter is eligible to vote early,
  1445. // prior to election day.
  1446. EarlyVoteSites []*PollingLocation `json:"earlyVoteSites,omitempty"`
  1447. // Election: The election that was queried.
  1448. Election *Election `json:"election,omitempty"`
  1449. // Kind: Identifies what kind of resource this is. Value: the fixed
  1450. // string "civicinfo#voterInfoResponse".
  1451. Kind string `json:"kind,omitempty"`
  1452. // MailOnly: Specifies whether voters in the precinct vote only by
  1453. // mailing their ballots (with the possible option of dropping off their
  1454. // ballots as well).
  1455. MailOnly bool `json:"mailOnly,omitempty"`
  1456. // NormalizedInput: The normalized version of the requested address
  1457. NormalizedInput *SimpleAddressType `json:"normalizedInput,omitempty"`
  1458. // OtherElections: When there are multiple elections for a voter
  1459. // address, the otherElections field is populated in the API response
  1460. // and there are two possibilities: 1. If the earliest election is not
  1461. // the intended election, specify the election ID of the desired
  1462. // election in a second API request using the electionId field. 2. If
  1463. // these elections occur on the same day, the API doesn?t return any
  1464. // polling location, contest, or election official information to ensure
  1465. // that an additional query is made. For user-facing applications, we
  1466. // recommend displaying these elections to the user to disambiguate. A
  1467. // second API request using the electionId field should be made for the
  1468. // election that is relevant to the user.
  1469. OtherElections []*Election `json:"otherElections,omitempty"`
  1470. // PollingLocations: Locations where the voter is eligible to vote on
  1471. // election day.
  1472. PollingLocations []*PollingLocation `json:"pollingLocations,omitempty"`
  1473. PrecinctId string `json:"precinctId,omitempty"`
  1474. Segments []*StreetSegment `json:"segments,omitempty"`
  1475. // State: Local Election Information for the state that the voter votes
  1476. // in. For the US, there will only be one element in this array.
  1477. State []*AdministrationRegion `json:"state,omitempty"`
  1478. // ServerResponse contains the HTTP response code and headers from the
  1479. // server.
  1480. googleapi.ServerResponse `json:"-"`
  1481. // ForceSendFields is a list of field names (e.g. "Contests") to
  1482. // unconditionally include in API requests. By default, fields with
  1483. // empty values are omitted from API requests. However, any non-pointer,
  1484. // non-interface field appearing in ForceSendFields will be sent to the
  1485. // server regardless of whether the field is empty or not. This may be
  1486. // used to include empty fields in Patch requests.
  1487. ForceSendFields []string `json:"-"`
  1488. // NullFields is a list of field names (e.g. "Contests") to include in
  1489. // API requests with the JSON null value. By default, fields with empty
  1490. // values are omitted from API requests. However, any field with an
  1491. // empty value appearing in NullFields will be sent to the server as
  1492. // null. It is an error if a field in this list has a non-empty value.
  1493. // This may be used to include null fields in Patch requests.
  1494. NullFields []string `json:"-"`
  1495. }
  1496. func (s *VoterInfoResponse) MarshalJSON() ([]byte, error) {
  1497. type NoMethod VoterInfoResponse
  1498. raw := NoMethod(*s)
  1499. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1500. }
  1501. type VoterInfoSegmentResult struct {
  1502. GeneratedMillis int64 `json:"generatedMillis,omitempty,string"`
  1503. PostalAddress *PostalAddress `json:"postalAddress,omitempty"`
  1504. Request *VoterInfoRequest `json:"request,omitempty"`
  1505. Response *VoterInfoResponse `json:"response,omitempty"`
  1506. // ForceSendFields is a list of field names (e.g. "GeneratedMillis") to
  1507. // unconditionally include in API requests. By default, fields with
  1508. // empty values are omitted from API requests. However, any non-pointer,
  1509. // non-interface field appearing in ForceSendFields will be sent to the
  1510. // server regardless of whether the field is empty or not. This may be
  1511. // used to include empty fields in Patch requests.
  1512. ForceSendFields []string `json:"-"`
  1513. // NullFields is a list of field names (e.g. "GeneratedMillis") to
  1514. // include in API requests with the JSON null value. By default, fields
  1515. // with empty values are omitted from API requests. However, any field
  1516. // with an empty value appearing in NullFields will be sent to the
  1517. // server as null. It is an error if a field in this list has a
  1518. // non-empty value. This may be used to include null fields in Patch
  1519. // requests.
  1520. NullFields []string `json:"-"`
  1521. }
  1522. func (s *VoterInfoSegmentResult) MarshalJSON() ([]byte, error) {
  1523. type NoMethod VoterInfoSegmentResult
  1524. raw := NoMethod(*s)
  1525. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1526. }
  1527. // method id "civicinfo.divisions.search":
  1528. type DivisionsSearchCall struct {
  1529. s *Service
  1530. divisionsearchrequest *DivisionSearchRequest
  1531. urlParams_ gensupport.URLParams
  1532. ifNoneMatch_ string
  1533. ctx_ context.Context
  1534. header_ http.Header
  1535. }
  1536. // Search: Searches for political divisions by their natural name or OCD
  1537. // ID.
  1538. func (r *DivisionsService) Search(divisionsearchrequest *DivisionSearchRequest) *DivisionsSearchCall {
  1539. c := &DivisionsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1540. c.divisionsearchrequest = divisionsearchrequest
  1541. return c
  1542. }
  1543. // Query sets the optional parameter "query": The search query. Queries
  1544. // can cover any parts of a OCD ID or a human readable division name.
  1545. // All words given in the query are treated as required patterns. In
  1546. // addition to that, most query operators of the Apache Lucene library
  1547. // are supported. See
  1548. // http://lucene.apache.org/core/2_9_4/queryparsersyntax.html
  1549. func (c *DivisionsSearchCall) Query(query string) *DivisionsSearchCall {
  1550. c.urlParams_.Set("query", query)
  1551. return c
  1552. }
  1553. // Fields allows partial responses to be retrieved. See
  1554. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1555. // for more information.
  1556. func (c *DivisionsSearchCall) Fields(s ...googleapi.Field) *DivisionsSearchCall {
  1557. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1558. return c
  1559. }
  1560. // IfNoneMatch sets the optional parameter which makes the operation
  1561. // fail if the object's ETag matches the given value. This is useful for
  1562. // getting updates only after the object has changed since the last
  1563. // request. Use googleapi.IsNotModified to check whether the response
  1564. // error from Do is the result of In-None-Match.
  1565. func (c *DivisionsSearchCall) IfNoneMatch(entityTag string) *DivisionsSearchCall {
  1566. c.ifNoneMatch_ = entityTag
  1567. return c
  1568. }
  1569. // Context sets the context to be used in this call's Do method. Any
  1570. // pending HTTP request will be aborted if the provided context is
  1571. // canceled.
  1572. func (c *DivisionsSearchCall) Context(ctx context.Context) *DivisionsSearchCall {
  1573. c.ctx_ = ctx
  1574. return c
  1575. }
  1576. // Header returns an http.Header that can be modified by the caller to
  1577. // add HTTP headers to the request.
  1578. func (c *DivisionsSearchCall) Header() http.Header {
  1579. if c.header_ == nil {
  1580. c.header_ = make(http.Header)
  1581. }
  1582. return c.header_
  1583. }
  1584. func (c *DivisionsSearchCall) doRequest(alt string) (*http.Response, error) {
  1585. reqHeaders := make(http.Header)
  1586. for k, v := range c.header_ {
  1587. reqHeaders[k] = v
  1588. }
  1589. reqHeaders.Set("User-Agent", c.s.userAgent())
  1590. if c.ifNoneMatch_ != "" {
  1591. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1592. }
  1593. var body io.Reader = nil
  1594. c.urlParams_.Set("alt", alt)
  1595. c.urlParams_.Set("prettyPrint", "false")
  1596. urls := googleapi.ResolveRelative(c.s.BasePath, "divisions")
  1597. urls += "?" + c.urlParams_.Encode()
  1598. req, err := http.NewRequest("GET", urls, body)
  1599. if err != nil {
  1600. return nil, err
  1601. }
  1602. req.Header = reqHeaders
  1603. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1604. }
  1605. // Do executes the "civicinfo.divisions.search" call.
  1606. // Exactly one of *DivisionSearchResponse or error will be non-nil. Any
  1607. // non-2xx status code is an error. Response headers are in either
  1608. // *DivisionSearchResponse.ServerResponse.Header or (if a response was
  1609. // returned at all) in error.(*googleapi.Error).Header. Use
  1610. // googleapi.IsNotModified to check whether the returned error was
  1611. // because http.StatusNotModified was returned.
  1612. func (c *DivisionsSearchCall) Do(opts ...googleapi.CallOption) (*DivisionSearchResponse, error) {
  1613. gensupport.SetOptions(c.urlParams_, opts...)
  1614. res, err := c.doRequest("json")
  1615. if res != nil && res.StatusCode == http.StatusNotModified {
  1616. if res.Body != nil {
  1617. res.Body.Close()
  1618. }
  1619. return nil, &googleapi.Error{
  1620. Code: res.StatusCode,
  1621. Header: res.Header,
  1622. }
  1623. }
  1624. if err != nil {
  1625. return nil, err
  1626. }
  1627. defer googleapi.CloseBody(res)
  1628. if err := googleapi.CheckResponse(res); err != nil {
  1629. return nil, err
  1630. }
  1631. ret := &DivisionSearchResponse{
  1632. ServerResponse: googleapi.ServerResponse{
  1633. Header: res.Header,
  1634. HTTPStatusCode: res.StatusCode,
  1635. },
  1636. }
  1637. target := &ret
  1638. if err := gensupport.DecodeResponse(target, res); err != nil {
  1639. return nil, err
  1640. }
  1641. return ret, nil
  1642. // {
  1643. // "description": "Searches for political divisions by their natural name or OCD ID.",
  1644. // "httpMethod": "GET",
  1645. // "id": "civicinfo.divisions.search",
  1646. // "parameters": {
  1647. // "query": {
  1648. // "description": "The search query. Queries can cover any parts of a OCD ID or a human readable division name. All words given in the query are treated as required patterns. In addition to that, most query operators of the Apache Lucene library are supported. See http://lucene.apache.org/core/2_9_4/queryparsersyntax.html",
  1649. // "location": "query",
  1650. // "type": "string"
  1651. // }
  1652. // },
  1653. // "path": "divisions",
  1654. // "request": {
  1655. // "$ref": "DivisionSearchRequest"
  1656. // },
  1657. // "response": {
  1658. // "$ref": "DivisionSearchResponse"
  1659. // }
  1660. // }
  1661. }
  1662. // method id "civicinfo.elections.electionQuery":
  1663. type ElectionsElectionQueryCall struct {
  1664. s *Service
  1665. electionsqueryrequest *ElectionsQueryRequest
  1666. urlParams_ gensupport.URLParams
  1667. ifNoneMatch_ string
  1668. ctx_ context.Context
  1669. header_ http.Header
  1670. }
  1671. // ElectionQuery: List of available elections to query.
  1672. func (r *ElectionsService) ElectionQuery(electionsqueryrequest *ElectionsQueryRequest) *ElectionsElectionQueryCall {
  1673. c := &ElectionsElectionQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1674. c.electionsqueryrequest = electionsqueryrequest
  1675. return c
  1676. }
  1677. // Fields allows partial responses to be retrieved. See
  1678. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1679. // for more information.
  1680. func (c *ElectionsElectionQueryCall) Fields(s ...googleapi.Field) *ElectionsElectionQueryCall {
  1681. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1682. return c
  1683. }
  1684. // IfNoneMatch sets the optional parameter which makes the operation
  1685. // fail if the object's ETag matches the given value. This is useful for
  1686. // getting updates only after the object has changed since the last
  1687. // request. Use googleapi.IsNotModified to check whether the response
  1688. // error from Do is the result of In-None-Match.
  1689. func (c *ElectionsElectionQueryCall) IfNoneMatch(entityTag string) *ElectionsElectionQueryCall {
  1690. c.ifNoneMatch_ = entityTag
  1691. return c
  1692. }
  1693. // Context sets the context to be used in this call's Do method. Any
  1694. // pending HTTP request will be aborted if the provided context is
  1695. // canceled.
  1696. func (c *ElectionsElectionQueryCall) Context(ctx context.Context) *ElectionsElectionQueryCall {
  1697. c.ctx_ = ctx
  1698. return c
  1699. }
  1700. // Header returns an http.Header that can be modified by the caller to
  1701. // add HTTP headers to the request.
  1702. func (c *ElectionsElectionQueryCall) Header() http.Header {
  1703. if c.header_ == nil {
  1704. c.header_ = make(http.Header)
  1705. }
  1706. return c.header_
  1707. }
  1708. func (c *ElectionsElectionQueryCall) doRequest(alt string) (*http.Response, error) {
  1709. reqHeaders := make(http.Header)
  1710. for k, v := range c.header_ {
  1711. reqHeaders[k] = v
  1712. }
  1713. reqHeaders.Set("User-Agent", c.s.userAgent())
  1714. if c.ifNoneMatch_ != "" {
  1715. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1716. }
  1717. var body io.Reader = nil
  1718. c.urlParams_.Set("alt", alt)
  1719. c.urlParams_.Set("prettyPrint", "false")
  1720. urls := googleapi.ResolveRelative(c.s.BasePath, "elections")
  1721. urls += "?" + c.urlParams_.Encode()
  1722. req, err := http.NewRequest("GET", urls, body)
  1723. if err != nil {
  1724. return nil, err
  1725. }
  1726. req.Header = reqHeaders
  1727. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1728. }
  1729. // Do executes the "civicinfo.elections.electionQuery" call.
  1730. // Exactly one of *ElectionsQueryResponse or error will be non-nil. Any
  1731. // non-2xx status code is an error. Response headers are in either
  1732. // *ElectionsQueryResponse.ServerResponse.Header or (if a response was
  1733. // returned at all) in error.(*googleapi.Error).Header. Use
  1734. // googleapi.IsNotModified to check whether the returned error was
  1735. // because http.StatusNotModified was returned.
  1736. func (c *ElectionsElectionQueryCall) Do(opts ...googleapi.CallOption) (*ElectionsQueryResponse, error) {
  1737. gensupport.SetOptions(c.urlParams_, opts...)
  1738. res, err := c.doRequest("json")
  1739. if res != nil && res.StatusCode == http.StatusNotModified {
  1740. if res.Body != nil {
  1741. res.Body.Close()
  1742. }
  1743. return nil, &googleapi.Error{
  1744. Code: res.StatusCode,
  1745. Header: res.Header,
  1746. }
  1747. }
  1748. if err != nil {
  1749. return nil, err
  1750. }
  1751. defer googleapi.CloseBody(res)
  1752. if err := googleapi.CheckResponse(res); err != nil {
  1753. return nil, err
  1754. }
  1755. ret := &ElectionsQueryResponse{
  1756. ServerResponse: googleapi.ServerResponse{
  1757. Header: res.Header,
  1758. HTTPStatusCode: res.StatusCode,
  1759. },
  1760. }
  1761. target := &ret
  1762. if err := gensupport.DecodeResponse(target, res); err != nil {
  1763. return nil, err
  1764. }
  1765. return ret, nil
  1766. // {
  1767. // "description": "List of available elections to query.",
  1768. // "httpMethod": "GET",
  1769. // "id": "civicinfo.elections.electionQuery",
  1770. // "path": "elections",
  1771. // "request": {
  1772. // "$ref": "ElectionsQueryRequest"
  1773. // },
  1774. // "response": {
  1775. // "$ref": "ElectionsQueryResponse"
  1776. // }
  1777. // }
  1778. }
  1779. // method id "civicinfo.elections.voterInfoQuery":
  1780. type ElectionsVoterInfoQueryCall struct {
  1781. s *Service
  1782. voterinforequest *VoterInfoRequest
  1783. urlParams_ gensupport.URLParams
  1784. ifNoneMatch_ string
  1785. ctx_ context.Context
  1786. header_ http.Header
  1787. }
  1788. // VoterInfoQuery: Looks up information relevant to a voter based on the
  1789. // voter's registered address.
  1790. func (r *ElectionsService) VoterInfoQuery(address string, voterinforequest *VoterInfoRequest) *ElectionsVoterInfoQueryCall {
  1791. c := &ElectionsVoterInfoQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1792. c.urlParams_.Set("address", address)
  1793. c.voterinforequest = voterinforequest
  1794. return c
  1795. }
  1796. // ElectionId sets the optional parameter "electionId": The unique ID of
  1797. // the election to look up. A list of election IDs can be obtained at
  1798. // https://www.googleapis.com/civicinfo/{version}/electionsIf no
  1799. // election ID is specified in the query and there is more than one
  1800. // election with data for the given voter, the additional elections are
  1801. // provided in the otherElections response field.
  1802. func (c *ElectionsVoterInfoQueryCall) ElectionId(electionId int64) *ElectionsVoterInfoQueryCall {
  1803. c.urlParams_.Set("electionId", fmt.Sprint(electionId))
  1804. return c
  1805. }
  1806. // OfficialOnly sets the optional parameter "officialOnly": If set to
  1807. // true, only data from official state sources will be returned.
  1808. func (c *ElectionsVoterInfoQueryCall) OfficialOnly(officialOnly bool) *ElectionsVoterInfoQueryCall {
  1809. c.urlParams_.Set("officialOnly", fmt.Sprint(officialOnly))
  1810. return c
  1811. }
  1812. // ReturnAllAvailableData sets the optional parameter
  1813. // "returnAllAvailableData": If set to true, the query will return the
  1814. // success codeand include any partial information when it is unable to
  1815. // determine a matching address or unable to determine the election for
  1816. // electionId=0 queries.
  1817. func (c *ElectionsVoterInfoQueryCall) ReturnAllAvailableData(returnAllAvailableData bool) *ElectionsVoterInfoQueryCall {
  1818. c.urlParams_.Set("returnAllAvailableData", fmt.Sprint(returnAllAvailableData))
  1819. return c
  1820. }
  1821. // Fields allows partial responses to be retrieved. See
  1822. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1823. // for more information.
  1824. func (c *ElectionsVoterInfoQueryCall) Fields(s ...googleapi.Field) *ElectionsVoterInfoQueryCall {
  1825. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1826. return c
  1827. }
  1828. // IfNoneMatch sets the optional parameter which makes the operation
  1829. // fail if the object's ETag matches the given value. This is useful for
  1830. // getting updates only after the object has changed since the last
  1831. // request. Use googleapi.IsNotModified to check whether the response
  1832. // error from Do is the result of In-None-Match.
  1833. func (c *ElectionsVoterInfoQueryCall) IfNoneMatch(entityTag string) *ElectionsVoterInfoQueryCall {
  1834. c.ifNoneMatch_ = entityTag
  1835. return c
  1836. }
  1837. // Context sets the context to be used in this call's Do method. Any
  1838. // pending HTTP request will be aborted if the provided context is
  1839. // canceled.
  1840. func (c *ElectionsVoterInfoQueryCall) Context(ctx context.Context) *ElectionsVoterInfoQueryCall {
  1841. c.ctx_ = ctx
  1842. return c
  1843. }
  1844. // Header returns an http.Header that can be modified by the caller to
  1845. // add HTTP headers to the request.
  1846. func (c *ElectionsVoterInfoQueryCall) Header() http.Header {
  1847. if c.header_ == nil {
  1848. c.header_ = make(http.Header)
  1849. }
  1850. return c.header_
  1851. }
  1852. func (c *ElectionsVoterInfoQueryCall) doRequest(alt string) (*http.Response, error) {
  1853. reqHeaders := make(http.Header)
  1854. for k, v := range c.header_ {
  1855. reqHeaders[k] = v
  1856. }
  1857. reqHeaders.Set("User-Agent", c.s.userAgent())
  1858. if c.ifNoneMatch_ != "" {
  1859. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1860. }
  1861. var body io.Reader = nil
  1862. c.urlParams_.Set("alt", alt)
  1863. c.urlParams_.Set("prettyPrint", "false")
  1864. urls := googleapi.ResolveRelative(c.s.BasePath, "voterinfo")
  1865. urls += "?" + c.urlParams_.Encode()
  1866. req, err := http.NewRequest("GET", urls, body)
  1867. if err != nil {
  1868. return nil, err
  1869. }
  1870. req.Header = reqHeaders
  1871. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1872. }
  1873. // Do executes the "civicinfo.elections.voterInfoQuery" call.
  1874. // Exactly one of *VoterInfoResponse or error will be non-nil. Any
  1875. // non-2xx status code is an error. Response headers are in either
  1876. // *VoterInfoResponse.ServerResponse.Header or (if a response was
  1877. // returned at all) in error.(*googleapi.Error).Header. Use
  1878. // googleapi.IsNotModified to check whether the returned error was
  1879. // because http.StatusNotModified was returned.
  1880. func (c *ElectionsVoterInfoQueryCall) Do(opts ...googleapi.CallOption) (*VoterInfoResponse, error) {
  1881. gensupport.SetOptions(c.urlParams_, opts...)
  1882. res, err := c.doRequest("json")
  1883. if res != nil && res.StatusCode == http.StatusNotModified {
  1884. if res.Body != nil {
  1885. res.Body.Close()
  1886. }
  1887. return nil, &googleapi.Error{
  1888. Code: res.StatusCode,
  1889. Header: res.Header,
  1890. }
  1891. }
  1892. if err != nil {
  1893. return nil, err
  1894. }
  1895. defer googleapi.CloseBody(res)
  1896. if err := googleapi.CheckResponse(res); err != nil {
  1897. return nil, err
  1898. }
  1899. ret := &VoterInfoResponse{
  1900. ServerResponse: googleapi.ServerResponse{
  1901. Header: res.Header,
  1902. HTTPStatusCode: res.StatusCode,
  1903. },
  1904. }
  1905. target := &ret
  1906. if err := gensupport.DecodeResponse(target, res); err != nil {
  1907. return nil, err
  1908. }
  1909. return ret, nil
  1910. // {
  1911. // "description": "Looks up information relevant to a voter based on the voter's registered address.",
  1912. // "httpMethod": "GET",
  1913. // "id": "civicinfo.elections.voterInfoQuery",
  1914. // "parameterOrder": [
  1915. // "address"
  1916. // ],
  1917. // "parameters": {
  1918. // "address": {
  1919. // "description": "The registered address of the voter to look up.",
  1920. // "location": "query",
  1921. // "required": true,
  1922. // "type": "string"
  1923. // },
  1924. // "electionId": {
  1925. // "default": "0",
  1926. // "description": "The unique ID of the election to look up. A list of election IDs can be obtained at https://www.googleapis.com/civicinfo/{version}/electionsIf no election ID is specified in the query and there is more than one election with data for the given voter, the additional elections are provided in the otherElections response field.",
  1927. // "format": "int64",
  1928. // "location": "query",
  1929. // "type": "string"
  1930. // },
  1931. // "officialOnly": {
  1932. // "default": "false",
  1933. // "description": "If set to true, only data from official state sources will be returned.",
  1934. // "location": "query",
  1935. // "type": "boolean"
  1936. // },
  1937. // "returnAllAvailableData": {
  1938. // "default": "false",
  1939. // "description": "If set to true, the query will return the success codeand include any partial information when it is unable to determine a matching address or unable to determine the election for electionId=0 queries.",
  1940. // "location": "query",
  1941. // "type": "boolean"
  1942. // }
  1943. // },
  1944. // "path": "voterinfo",
  1945. // "request": {
  1946. // "$ref": "VoterInfoRequest"
  1947. // },
  1948. // "response": {
  1949. // "$ref": "VoterInfoResponse"
  1950. // }
  1951. // }
  1952. }
  1953. // method id "civicinfo.representatives.representativeInfoByAddress":
  1954. type RepresentativesRepresentativeInfoByAddressCall struct {
  1955. s *Service
  1956. representativeinforequest *RepresentativeInfoRequest
  1957. urlParams_ gensupport.URLParams
  1958. ifNoneMatch_ string
  1959. ctx_ context.Context
  1960. header_ http.Header
  1961. }
  1962. // RepresentativeInfoByAddress: Looks up political geography and
  1963. // representative information for a single address.
  1964. func (r *RepresentativesService) RepresentativeInfoByAddress(representativeinforequest *RepresentativeInfoRequest) *RepresentativesRepresentativeInfoByAddressCall {
  1965. c := &RepresentativesRepresentativeInfoByAddressCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1966. c.representativeinforequest = representativeinforequest
  1967. return c
  1968. }
  1969. // Address sets the optional parameter "address": The address to look
  1970. // up. May only be specified if the field ocdId is not given in the URL.
  1971. func (c *RepresentativesRepresentativeInfoByAddressCall) Address(address string) *RepresentativesRepresentativeInfoByAddressCall {
  1972. c.urlParams_.Set("address", address)
  1973. return c
  1974. }
  1975. // IncludeOffices sets the optional parameter "includeOffices": Whether
  1976. // to return information about offices and officials. If false, only the
  1977. // top-level district information will be returned.
  1978. func (c *RepresentativesRepresentativeInfoByAddressCall) IncludeOffices(includeOffices bool) *RepresentativesRepresentativeInfoByAddressCall {
  1979. c.urlParams_.Set("includeOffices", fmt.Sprint(includeOffices))
  1980. return c
  1981. }
  1982. // Levels sets the optional parameter "levels": A list of office levels
  1983. // to filter by. Only offices that serve at least one of these levels
  1984. // will be returned. Divisions that don't contain a matching office will
  1985. // not be returned.
  1986. //
  1987. // Possible values:
  1988. // "administrativeArea1"
  1989. // "administrativeArea2"
  1990. // "country"
  1991. // "international"
  1992. // "locality"
  1993. // "regional"
  1994. // "special"
  1995. // "subLocality1"
  1996. // "subLocality2"
  1997. func (c *RepresentativesRepresentativeInfoByAddressCall) Levels(levels ...string) *RepresentativesRepresentativeInfoByAddressCall {
  1998. c.urlParams_.SetMulti("levels", append([]string{}, levels...))
  1999. return c
  2000. }
  2001. // Roles sets the optional parameter "roles": A list of office roles to
  2002. // filter by. Only offices fulfilling one of these roles will be
  2003. // returned. Divisions that don't contain a matching office will not be
  2004. // returned.
  2005. //
  2006. // Possible values:
  2007. // "deputyHeadOfGovernment"
  2008. // "executiveCouncil"
  2009. // "governmentOfficer"
  2010. // "headOfGovernment"
  2011. // "headOfState"
  2012. // "highestCourtJudge"
  2013. // "judge"
  2014. // "legislatorLowerBody"
  2015. // "legislatorUpperBody"
  2016. // "schoolBoard"
  2017. // "specialPurposeOfficer"
  2018. func (c *RepresentativesRepresentativeInfoByAddressCall) Roles(roles ...string) *RepresentativesRepresentativeInfoByAddressCall {
  2019. c.urlParams_.SetMulti("roles", append([]string{}, roles...))
  2020. return c
  2021. }
  2022. // Fields allows partial responses to be retrieved. See
  2023. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2024. // for more information.
  2025. func (c *RepresentativesRepresentativeInfoByAddressCall) Fields(s ...googleapi.Field) *RepresentativesRepresentativeInfoByAddressCall {
  2026. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2027. return c
  2028. }
  2029. // IfNoneMatch sets the optional parameter which makes the operation
  2030. // fail if the object's ETag matches the given value. This is useful for
  2031. // getting updates only after the object has changed since the last
  2032. // request. Use googleapi.IsNotModified to check whether the response
  2033. // error from Do is the result of In-None-Match.
  2034. func (c *RepresentativesRepresentativeInfoByAddressCall) IfNoneMatch(entityTag string) *RepresentativesRepresentativeInfoByAddressCall {
  2035. c.ifNoneMatch_ = entityTag
  2036. return c
  2037. }
  2038. // Context sets the context to be used in this call's Do method. Any
  2039. // pending HTTP request will be aborted if the provided context is
  2040. // canceled.
  2041. func (c *RepresentativesRepresentativeInfoByAddressCall) Context(ctx context.Context) *RepresentativesRepresentativeInfoByAddressCall {
  2042. c.ctx_ = ctx
  2043. return c
  2044. }
  2045. // Header returns an http.Header that can be modified by the caller to
  2046. // add HTTP headers to the request.
  2047. func (c *RepresentativesRepresentativeInfoByAddressCall) Header() http.Header {
  2048. if c.header_ == nil {
  2049. c.header_ = make(http.Header)
  2050. }
  2051. return c.header_
  2052. }
  2053. func (c *RepresentativesRepresentativeInfoByAddressCall) doRequest(alt string) (*http.Response, error) {
  2054. reqHeaders := make(http.Header)
  2055. for k, v := range c.header_ {
  2056. reqHeaders[k] = v
  2057. }
  2058. reqHeaders.Set("User-Agent", c.s.userAgent())
  2059. if c.ifNoneMatch_ != "" {
  2060. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2061. }
  2062. var body io.Reader = nil
  2063. c.urlParams_.Set("alt", alt)
  2064. c.urlParams_.Set("prettyPrint", "false")
  2065. urls := googleapi.ResolveRelative(c.s.BasePath, "representatives")
  2066. urls += "?" + c.urlParams_.Encode()
  2067. req, err := http.NewRequest("GET", urls, body)
  2068. if err != nil {
  2069. return nil, err
  2070. }
  2071. req.Header = reqHeaders
  2072. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2073. }
  2074. // Do executes the "civicinfo.representatives.representativeInfoByAddress" call.
  2075. // Exactly one of *RepresentativeInfoResponse or error will be non-nil.
  2076. // Any non-2xx status code is an error. Response headers are in either
  2077. // *RepresentativeInfoResponse.ServerResponse.Header or (if a response
  2078. // was returned at all) in error.(*googleapi.Error).Header. Use
  2079. // googleapi.IsNotModified to check whether the returned error was
  2080. // because http.StatusNotModified was returned.
  2081. func (c *RepresentativesRepresentativeInfoByAddressCall) Do(opts ...googleapi.CallOption) (*RepresentativeInfoResponse, error) {
  2082. gensupport.SetOptions(c.urlParams_, opts...)
  2083. res, err := c.doRequest("json")
  2084. if res != nil && res.StatusCode == http.StatusNotModified {
  2085. if res.Body != nil {
  2086. res.Body.Close()
  2087. }
  2088. return nil, &googleapi.Error{
  2089. Code: res.StatusCode,
  2090. Header: res.Header,
  2091. }
  2092. }
  2093. if err != nil {
  2094. return nil, err
  2095. }
  2096. defer googleapi.CloseBody(res)
  2097. if err := googleapi.CheckResponse(res); err != nil {
  2098. return nil, err
  2099. }
  2100. ret := &RepresentativeInfoResponse{
  2101. ServerResponse: googleapi.ServerResponse{
  2102. Header: res.Header,
  2103. HTTPStatusCode: res.StatusCode,
  2104. },
  2105. }
  2106. target := &ret
  2107. if err := gensupport.DecodeResponse(target, res); err != nil {
  2108. return nil, err
  2109. }
  2110. return ret, nil
  2111. // {
  2112. // "description": "Looks up political geography and representative information for a single address.",
  2113. // "httpMethod": "GET",
  2114. // "id": "civicinfo.representatives.representativeInfoByAddress",
  2115. // "parameters": {
  2116. // "address": {
  2117. // "description": "The address to look up. May only be specified if the field ocdId is not given in the URL.",
  2118. // "location": "query",
  2119. // "type": "string"
  2120. // },
  2121. // "includeOffices": {
  2122. // "default": "true",
  2123. // "description": "Whether to return information about offices and officials. If false, only the top-level district information will be returned.",
  2124. // "location": "query",
  2125. // "type": "boolean"
  2126. // },
  2127. // "levels": {
  2128. // "description": "A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching office will not be returned.",
  2129. // "enum": [
  2130. // "administrativeArea1",
  2131. // "administrativeArea2",
  2132. // "country",
  2133. // "international",
  2134. // "locality",
  2135. // "regional",
  2136. // "special",
  2137. // "subLocality1",
  2138. // "subLocality2"
  2139. // ],
  2140. // "enumDescriptions": [
  2141. // "",
  2142. // "",
  2143. // "",
  2144. // "",
  2145. // "",
  2146. // "",
  2147. // "",
  2148. // "",
  2149. // ""
  2150. // ],
  2151. // "location": "query",
  2152. // "repeated": true,
  2153. // "type": "string"
  2154. // },
  2155. // "roles": {
  2156. // "description": "A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will not be returned.",
  2157. // "enum": [
  2158. // "deputyHeadOfGovernment",
  2159. // "executiveCouncil",
  2160. // "governmentOfficer",
  2161. // "headOfGovernment",
  2162. // "headOfState",
  2163. // "highestCourtJudge",
  2164. // "judge",
  2165. // "legislatorLowerBody",
  2166. // "legislatorUpperBody",
  2167. // "schoolBoard",
  2168. // "specialPurposeOfficer"
  2169. // ],
  2170. // "enumDescriptions": [
  2171. // "",
  2172. // "",
  2173. // "",
  2174. // "",
  2175. // "",
  2176. // "",
  2177. // "",
  2178. // "",
  2179. // "",
  2180. // "",
  2181. // ""
  2182. // ],
  2183. // "location": "query",
  2184. // "repeated": true,
  2185. // "type": "string"
  2186. // }
  2187. // },
  2188. // "path": "representatives",
  2189. // "request": {
  2190. // "$ref": "RepresentativeInfoRequest"
  2191. // },
  2192. // "response": {
  2193. // "$ref": "RepresentativeInfoResponse"
  2194. // }
  2195. // }
  2196. }
  2197. // method id "civicinfo.representatives.representativeInfoByDivision":
  2198. type RepresentativesRepresentativeInfoByDivisionCall struct {
  2199. s *Service
  2200. ocdId string
  2201. divisionrepresentativeinforequest *DivisionRepresentativeInfoRequest
  2202. urlParams_ gensupport.URLParams
  2203. ifNoneMatch_ string
  2204. ctx_ context.Context
  2205. header_ http.Header
  2206. }
  2207. // RepresentativeInfoByDivision: Looks up representative information for
  2208. // a single geographic division.
  2209. func (r *RepresentativesService) RepresentativeInfoByDivision(ocdId string, divisionrepresentativeinforequest *DivisionRepresentativeInfoRequest) *RepresentativesRepresentativeInfoByDivisionCall {
  2210. c := &RepresentativesRepresentativeInfoByDivisionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2211. c.ocdId = ocdId
  2212. c.divisionrepresentativeinforequest = divisionrepresentativeinforequest
  2213. return c
  2214. }
  2215. // Levels sets the optional parameter "levels": A list of office levels
  2216. // to filter by. Only offices that serve at least one of these levels
  2217. // will be returned. Divisions that don't contain a matching office will
  2218. // not be returned.
  2219. //
  2220. // Possible values:
  2221. // "administrativeArea1"
  2222. // "administrativeArea2"
  2223. // "country"
  2224. // "international"
  2225. // "locality"
  2226. // "regional"
  2227. // "special"
  2228. // "subLocality1"
  2229. // "subLocality2"
  2230. func (c *RepresentativesRepresentativeInfoByDivisionCall) Levels(levels ...string) *RepresentativesRepresentativeInfoByDivisionCall {
  2231. c.urlParams_.SetMulti("levels", append([]string{}, levels...))
  2232. return c
  2233. }
  2234. // Recursive sets the optional parameter "recursive": If true,
  2235. // information about all divisions contained in the division requested
  2236. // will be included as well. For example, if querying
  2237. // ocd-division/country:us/district:dc, this would also return all DC's
  2238. // wards and ANCs.
  2239. func (c *RepresentativesRepresentativeInfoByDivisionCall) Recursive(recursive bool) *RepresentativesRepresentativeInfoByDivisionCall {
  2240. c.urlParams_.Set("recursive", fmt.Sprint(recursive))
  2241. return c
  2242. }
  2243. // Roles sets the optional parameter "roles": A list of office roles to
  2244. // filter by. Only offices fulfilling one of these roles will be
  2245. // returned. Divisions that don't contain a matching office will not be
  2246. // returned.
  2247. //
  2248. // Possible values:
  2249. // "deputyHeadOfGovernment"
  2250. // "executiveCouncil"
  2251. // "governmentOfficer"
  2252. // "headOfGovernment"
  2253. // "headOfState"
  2254. // "highestCourtJudge"
  2255. // "judge"
  2256. // "legislatorLowerBody"
  2257. // "legislatorUpperBody"
  2258. // "schoolBoard"
  2259. // "specialPurposeOfficer"
  2260. func (c *RepresentativesRepresentativeInfoByDivisionCall) Roles(roles ...string) *RepresentativesRepresentativeInfoByDivisionCall {
  2261. c.urlParams_.SetMulti("roles", append([]string{}, roles...))
  2262. return c
  2263. }
  2264. // Fields allows partial responses to be retrieved. See
  2265. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2266. // for more information.
  2267. func (c *RepresentativesRepresentativeInfoByDivisionCall) Fields(s ...googleapi.Field) *RepresentativesRepresentativeInfoByDivisionCall {
  2268. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2269. return c
  2270. }
  2271. // IfNoneMatch sets the optional parameter which makes the operation
  2272. // fail if the object's ETag matches the given value. This is useful for
  2273. // getting updates only after the object has changed since the last
  2274. // request. Use googleapi.IsNotModified to check whether the response
  2275. // error from Do is the result of In-None-Match.
  2276. func (c *RepresentativesRepresentativeInfoByDivisionCall) IfNoneMatch(entityTag string) *RepresentativesRepresentativeInfoByDivisionCall {
  2277. c.ifNoneMatch_ = entityTag
  2278. return c
  2279. }
  2280. // Context sets the context to be used in this call's Do method. Any
  2281. // pending HTTP request will be aborted if the provided context is
  2282. // canceled.
  2283. func (c *RepresentativesRepresentativeInfoByDivisionCall) Context(ctx context.Context) *RepresentativesRepresentativeInfoByDivisionCall {
  2284. c.ctx_ = ctx
  2285. return c
  2286. }
  2287. // Header returns an http.Header that can be modified by the caller to
  2288. // add HTTP headers to the request.
  2289. func (c *RepresentativesRepresentativeInfoByDivisionCall) Header() http.Header {
  2290. if c.header_ == nil {
  2291. c.header_ = make(http.Header)
  2292. }
  2293. return c.header_
  2294. }
  2295. func (c *RepresentativesRepresentativeInfoByDivisionCall) doRequest(alt string) (*http.Response, error) {
  2296. reqHeaders := make(http.Header)
  2297. for k, v := range c.header_ {
  2298. reqHeaders[k] = v
  2299. }
  2300. reqHeaders.Set("User-Agent", c.s.userAgent())
  2301. if c.ifNoneMatch_ != "" {
  2302. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2303. }
  2304. var body io.Reader = nil
  2305. c.urlParams_.Set("alt", alt)
  2306. c.urlParams_.Set("prettyPrint", "false")
  2307. urls := googleapi.ResolveRelative(c.s.BasePath, "representatives/{ocdId}")
  2308. urls += "?" + c.urlParams_.Encode()
  2309. req, err := http.NewRequest("GET", urls, body)
  2310. if err != nil {
  2311. return nil, err
  2312. }
  2313. req.Header = reqHeaders
  2314. googleapi.Expand(req.URL, map[string]string{
  2315. "ocdId": c.ocdId,
  2316. })
  2317. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2318. }
  2319. // Do executes the "civicinfo.representatives.representativeInfoByDivision" call.
  2320. // Exactly one of *RepresentativeInfoData or error will be non-nil. Any
  2321. // non-2xx status code is an error. Response headers are in either
  2322. // *RepresentativeInfoData.ServerResponse.Header or (if a response was
  2323. // returned at all) in error.(*googleapi.Error).Header. Use
  2324. // googleapi.IsNotModified to check whether the returned error was
  2325. // because http.StatusNotModified was returned.
  2326. func (c *RepresentativesRepresentativeInfoByDivisionCall) Do(opts ...googleapi.CallOption) (*RepresentativeInfoData, error) {
  2327. gensupport.SetOptions(c.urlParams_, opts...)
  2328. res, err := c.doRequest("json")
  2329. if res != nil && res.StatusCode == http.StatusNotModified {
  2330. if res.Body != nil {
  2331. res.Body.Close()
  2332. }
  2333. return nil, &googleapi.Error{
  2334. Code: res.StatusCode,
  2335. Header: res.Header,
  2336. }
  2337. }
  2338. if err != nil {
  2339. return nil, err
  2340. }
  2341. defer googleapi.CloseBody(res)
  2342. if err := googleapi.CheckResponse(res); err != nil {
  2343. return nil, err
  2344. }
  2345. ret := &RepresentativeInfoData{
  2346. ServerResponse: googleapi.ServerResponse{
  2347. Header: res.Header,
  2348. HTTPStatusCode: res.StatusCode,
  2349. },
  2350. }
  2351. target := &ret
  2352. if err := gensupport.DecodeResponse(target, res); err != nil {
  2353. return nil, err
  2354. }
  2355. return ret, nil
  2356. // {
  2357. // "description": "Looks up representative information for a single geographic division.",
  2358. // "httpMethod": "GET",
  2359. // "id": "civicinfo.representatives.representativeInfoByDivision",
  2360. // "parameterOrder": [
  2361. // "ocdId"
  2362. // ],
  2363. // "parameters": {
  2364. // "levels": {
  2365. // "description": "A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching office will not be returned.",
  2366. // "enum": [
  2367. // "administrativeArea1",
  2368. // "administrativeArea2",
  2369. // "country",
  2370. // "international",
  2371. // "locality",
  2372. // "regional",
  2373. // "special",
  2374. // "subLocality1",
  2375. // "subLocality2"
  2376. // ],
  2377. // "enumDescriptions": [
  2378. // "",
  2379. // "",
  2380. // "",
  2381. // "",
  2382. // "",
  2383. // "",
  2384. // "",
  2385. // "",
  2386. // ""
  2387. // ],
  2388. // "location": "query",
  2389. // "repeated": true,
  2390. // "type": "string"
  2391. // },
  2392. // "ocdId": {
  2393. // "description": "The Open Civic Data division identifier of the division to look up.",
  2394. // "location": "path",
  2395. // "required": true,
  2396. // "type": "string"
  2397. // },
  2398. // "recursive": {
  2399. // "description": "If true, information about all divisions contained in the division requested will be included as well. For example, if querying ocd-division/country:us/district:dc, this would also return all DC's wards and ANCs.",
  2400. // "location": "query",
  2401. // "type": "boolean"
  2402. // },
  2403. // "roles": {
  2404. // "description": "A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will not be returned.",
  2405. // "enum": [
  2406. // "deputyHeadOfGovernment",
  2407. // "executiveCouncil",
  2408. // "governmentOfficer",
  2409. // "headOfGovernment",
  2410. // "headOfState",
  2411. // "highestCourtJudge",
  2412. // "judge",
  2413. // "legislatorLowerBody",
  2414. // "legislatorUpperBody",
  2415. // "schoolBoard",
  2416. // "specialPurposeOfficer"
  2417. // ],
  2418. // "enumDescriptions": [
  2419. // "",
  2420. // "",
  2421. // "",
  2422. // "",
  2423. // "",
  2424. // "",
  2425. // "",
  2426. // "",
  2427. // "",
  2428. // "",
  2429. // ""
  2430. // ],
  2431. // "location": "query",
  2432. // "repeated": true,
  2433. // "type": "string"
  2434. // }
  2435. // },
  2436. // "path": "representatives/{ocdId}",
  2437. // "request": {
  2438. // "$ref": "DivisionRepresentativeInfoRequest"
  2439. // },
  2440. // "response": {
  2441. // "$ref": "RepresentativeInfoData"
  2442. // }
  2443. // }
  2444. }