Skip to content

Commit f7bfed1

Browse files
feat: Automated regeneration of CivicInfo client (googleapis#13211)
Auto-created at 2025-03-21 13:19:55 +0000 using the toys pull request generator.
1 parent d8c8e84 commit f7bfed1

33 files changed

+530
-428
lines changed

clients/civic_info/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
1111

1212
```elixir
1313
def deps do
14-
[{:google_api_civic_info, "~> 0.25"}]
14+
[{:google_api_civic_info, "~> 0.26"}]
1515
end
1616
```
1717

clients/civic_info/lib/google_api/civic_info/v2/api/divisions.ex

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ defmodule GoogleApi.CivicInfo.V2.Api.Divisions do
4848
4949
## Returns
5050
51-
* `{:ok, %GoogleApi.CivicInfo.V2.Model.DivisionByAddressResponse{}}` on success
51+
* `{:ok, %GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionByAddressResponse{}}` on success
5252
* `{:error, info}` on failure
5353
"""
5454
@spec civicinfo_divisions_query_division_by_address(Tesla.Env.client(), keyword(), keyword()) ::
55-
{:ok, GoogleApi.CivicInfo.V2.Model.DivisionByAddressResponse.t()}
55+
{:ok, GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionByAddressResponse.t()}
5656
| {:ok, Tesla.Env.t()}
5757
| {:ok, list()}
5858
| {:error, any()}
@@ -82,7 +82,8 @@ defmodule GoogleApi.CivicInfo.V2.Api.Divisions do
8282
connection
8383
|> Connection.execute(request)
8484
|> Response.decode(
85-
opts ++ [struct: %GoogleApi.CivicInfo.V2.Model.DivisionByAddressResponse{}]
85+
opts ++
86+
[struct: %GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionByAddressResponse{}]
8687
)
8788
end
8889

@@ -109,11 +110,11 @@ defmodule GoogleApi.CivicInfo.V2.Api.Divisions do
109110
110111
## Returns
111112
112-
* `{:ok, %GoogleApi.CivicInfo.V2.Model.DivisionSearchResponse{}}` on success
113+
* `{:ok, %GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionSearchResponse{}}` on success
113114
* `{:error, info}` on failure
114115
"""
115116
@spec civicinfo_divisions_search(Tesla.Env.client(), keyword(), keyword()) ::
116-
{:ok, GoogleApi.CivicInfo.V2.Model.DivisionSearchResponse.t()}
117+
{:ok, GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionSearchResponse.t()}
117118
| {:ok, Tesla.Env.t()}
118119
| {:ok, list()}
119120
| {:error, any()}
@@ -142,6 +143,8 @@ defmodule GoogleApi.CivicInfo.V2.Api.Divisions do
142143

143144
connection
144145
|> Connection.execute(request)
145-
|> Response.decode(opts ++ [struct: %GoogleApi.CivicInfo.V2.Model.DivisionSearchResponse{}])
146+
|> Response.decode(
147+
opts ++ [struct: %GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionSearchResponse{}]
148+
)
146149
end
147150
end

clients/civic_info/lib/google_api/civic_info/v2/api/elections.ex

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ defmodule GoogleApi.CivicInfo.V2.Api.Elections do
4848
4949
## Returns
5050
51-
* `{:ok, %GoogleApi.CivicInfo.V2.Model.ElectionsQueryResponse{}}` on success
51+
* `{:ok, %GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2ElectionsQueryResponse{}}` on success
5252
* `{:error, info}` on failure
5353
"""
5454
@spec civicinfo_elections_election_query(Tesla.Env.client(), keyword(), keyword()) ::
55-
{:ok, GoogleApi.CivicInfo.V2.Model.ElectionsQueryResponse.t()}
55+
{:ok, GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2ElectionsQueryResponse.t()}
5656
| {:ok, Tesla.Env.t()}
5757
| {:ok, list()}
5858
| {:error, any()}
@@ -81,7 +81,9 @@ defmodule GoogleApi.CivicInfo.V2.Api.Elections do
8181

8282
connection
8383
|> Connection.execute(request)
84-
|> Response.decode(opts ++ [struct: %GoogleApi.CivicInfo.V2.Model.ElectionsQueryResponse{}])
84+
|> Response.decode(
85+
opts ++ [struct: %GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2ElectionsQueryResponse{}]
86+
)
8587
end
8688

8789
@doc """
@@ -111,11 +113,11 @@ defmodule GoogleApi.CivicInfo.V2.Api.Elections do
111113
112114
## Returns
113115
114-
* `{:ok, %GoogleApi.CivicInfo.V2.Model.VoterInfoResponse{}}` on success
116+
* `{:ok, %GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2VoterInfoResponse{}}` on success
115117
* `{:error, info}` on failure
116118
"""
117119
@spec civicinfo_elections_voter_info_query(Tesla.Env.client(), keyword(), keyword()) ::
118-
{:ok, GoogleApi.CivicInfo.V2.Model.VoterInfoResponse.t()}
120+
{:ok, GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2VoterInfoResponse.t()}
119121
| {:ok, Tesla.Env.t()}
120122
| {:ok, list()}
121123
| {:error, any()}
@@ -148,6 +150,8 @@ defmodule GoogleApi.CivicInfo.V2.Api.Elections do
148150

149151
connection
150152
|> Connection.execute(request)
151-
|> Response.decode(opts ++ [struct: %GoogleApi.CivicInfo.V2.Model.VoterInfoResponse{}])
153+
|> Response.decode(
154+
opts ++ [struct: %GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2VoterInfoResponse{}]
155+
)
152156
end
153157
end

clients/civic_info/lib/google_api/civic_info/v2/api/representatives.ex

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ defmodule GoogleApi.CivicInfo.V2.Api.Representatives do
5151
5252
## Returns
5353
54-
* `{:ok, %GoogleApi.CivicInfo.V2.Model.RepresentativeInfoResponse{}}` on success
54+
* `{:ok, %GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2RepresentativeInfoResponse{}}` on success
5555
* `{:error, info}` on failure
5656
"""
5757
@spec civicinfo_representatives_representative_info_by_address(
5858
Tesla.Env.client(),
5959
keyword(),
6060
keyword()
6161
) ::
62-
{:ok, GoogleApi.CivicInfo.V2.Model.RepresentativeInfoResponse.t()}
62+
{:ok, GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2RepresentativeInfoResponse.t()}
6363
| {:ok, Tesla.Env.t()}
6464
| {:ok, list()}
6565
| {:error, any()}
@@ -96,7 +96,8 @@ defmodule GoogleApi.CivicInfo.V2.Api.Representatives do
9696
connection
9797
|> Connection.execute(request)
9898
|> Response.decode(
99-
opts ++ [struct: %GoogleApi.CivicInfo.V2.Model.RepresentativeInfoResponse{}]
99+
opts ++
100+
[struct: %GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2RepresentativeInfoResponse{}]
100101
)
101102
end
102103

@@ -126,7 +127,7 @@ defmodule GoogleApi.CivicInfo.V2.Api.Representatives do
126127
127128
## Returns
128129
129-
* `{:ok, %GoogleApi.CivicInfo.V2.Model.RepresentativeInfoData{}}` on success
130+
* `{:ok, %GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2RepresentativeInfoData{}}` on success
130131
* `{:error, info}` on failure
131132
"""
132133
@spec civicinfo_representatives_representative_info_by_division(
@@ -135,7 +136,7 @@ defmodule GoogleApi.CivicInfo.V2.Api.Representatives do
135136
keyword(),
136137
keyword()
137138
) ::
138-
{:ok, GoogleApi.CivicInfo.V2.Model.RepresentativeInfoData.t()}
139+
{:ok, GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2RepresentativeInfoData.t()}
139140
| {:ok, Tesla.Env.t()}
140141
| {:ok, list()}
141142
| {:error, any()}
@@ -173,6 +174,8 @@ defmodule GoogleApi.CivicInfo.V2.Api.Representatives do
173174

174175
connection
175176
|> Connection.execute(request)
176-
|> Response.decode(opts ++ [struct: %GoogleApi.CivicInfo.V2.Model.RepresentativeInfoData{}])
177+
|> Response.decode(
178+
opts ++ [struct: %GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2RepresentativeInfoData{}]
179+
)
177180
end
178181
end

clients/civic_info/lib/google_api/civic_info/v2/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.CivicInfo.V2 do
2020
API client metadata for GoogleApi.CivicInfo.V2.
2121
"""
2222

23-
@discovery_revision "20240910"
23+
@discovery_revision "20250320"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end

clients/civic_info/lib/google_api/civic_info/v2/model/administration_region.ex

Lines changed: 0 additions & 56 deletions
This file was deleted.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionByAddressResponse do
19+
@moduledoc """
20+
21+
22+
## Attributes
23+
24+
* `divisions` (*type:* `%{optional(String.t) => GoogleApi.CivicInfo.V2.Model.CivicinfoSchemaV2GeographicDivision.t}`, *default:* `nil`) -
25+
* `normalizedInput` (*type:* `GoogleApi.CivicInfo.V2.Model.CivicinfoSchemaV2SimpleAddressType.t`, *default:* `nil`) - The normalized version of the requested address.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:divisions =>
32+
%{
33+
optional(String.t()) =>
34+
GoogleApi.CivicInfo.V2.Model.CivicinfoSchemaV2GeographicDivision.t()
35+
}
36+
| nil,
37+
:normalizedInput =>
38+
GoogleApi.CivicInfo.V2.Model.CivicinfoSchemaV2SimpleAddressType.t() | nil
39+
}
40+
41+
field(:divisions,
42+
as: GoogleApi.CivicInfo.V2.Model.CivicinfoSchemaV2GeographicDivision,
43+
type: :map
44+
)
45+
46+
field(:normalizedInput, as: GoogleApi.CivicInfo.V2.Model.CivicinfoSchemaV2SimpleAddressType)
47+
end
48+
49+
defimpl Poison.Decoder,
50+
for: GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionByAddressResponse do
51+
def decode(value, options) do
52+
GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionByAddressResponse.decode(
53+
value,
54+
options
55+
)
56+
end
57+
end
58+
59+
defimpl Poison.Encoder,
60+
for: GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionByAddressResponse do
61+
def encode(value, options) do
62+
GoogleApi.Gax.ModelBase.encode(value, options)
63+
end
64+
end

clients/civic_info/lib/google_api/civic_info/v2/model/division_search_response.ex renamed to clients/civic_info/lib/google_api/civic_info/v2/model/civicinfo_apiprotos_v2_division_search_response.ex

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,41 @@
1515
# NOTE: This file is auto generated by the elixir code generator program.
1616
# Do not edit this file manually.
1717

18-
defmodule GoogleApi.CivicInfo.V2.Model.DivisionSearchResponse do
18+
defmodule GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionSearchResponse do
1919
@moduledoc """
2020
The result of a division search query.
2121
2222
## Attributes
2323
2424
* `kind` (*type:* `String.t`, *default:* `civicinfo#divisionSearchResponse`) - Identifies what kind of resource this is. Value: the fixed string "civicinfo#divisionSearchResponse".
25-
* `results` (*type:* `list(GoogleApi.CivicInfo.V2.Model.DivisionSearchResult.t)`, *default:* `nil`) -
25+
* `results` (*type:* `list(GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionSearchResult.t)`, *default:* `nil`) -
2626
"""
2727

2828
use GoogleApi.Gax.ModelBase
2929

3030
@type t :: %__MODULE__{
3131
:kind => String.t() | nil,
32-
:results => list(GoogleApi.CivicInfo.V2.Model.DivisionSearchResult.t()) | nil
32+
:results =>
33+
list(GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionSearchResult.t()) | nil
3334
}
3435

3536
field(:kind)
36-
field(:results, as: GoogleApi.CivicInfo.V2.Model.DivisionSearchResult, type: :list)
37+
38+
field(:results,
39+
as: GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionSearchResult,
40+
type: :list
41+
)
3742
end
3843

39-
defimpl Poison.Decoder, for: GoogleApi.CivicInfo.V2.Model.DivisionSearchResponse do
44+
defimpl Poison.Decoder,
45+
for: GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionSearchResponse do
4046
def decode(value, options) do
41-
GoogleApi.CivicInfo.V2.Model.DivisionSearchResponse.decode(value, options)
47+
GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionSearchResponse.decode(value, options)
4248
end
4349
end
4450

45-
defimpl Poison.Encoder, for: GoogleApi.CivicInfo.V2.Model.DivisionSearchResponse do
51+
defimpl Poison.Encoder,
52+
for: GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionSearchResponse do
4653
def encode(value, options) do
4754
GoogleApi.Gax.ModelBase.encode(value, options)
4855
end

clients/civic_info/lib/google_api/civic_info/v2/model/division_search_result.ex renamed to clients/civic_info/lib/google_api/civic_info/v2/model/civicinfo_apiprotos_v2_division_search_result.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# NOTE: This file is auto generated by the elixir code generator program.
1616
# Do not edit this file manually.
1717

18-
defmodule GoogleApi.CivicInfo.V2.Model.DivisionSearchResult do
18+
defmodule GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionSearchResult do
1919
@moduledoc """
2020
Represents a political geographic division that matches the requested query.
2121
@@ -39,13 +39,13 @@ defmodule GoogleApi.CivicInfo.V2.Model.DivisionSearchResult do
3939
field(:ocdId)
4040
end
4141

42-
defimpl Poison.Decoder, for: GoogleApi.CivicInfo.V2.Model.DivisionSearchResult do
42+
defimpl Poison.Decoder, for: GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionSearchResult do
4343
def decode(value, options) do
44-
GoogleApi.CivicInfo.V2.Model.DivisionSearchResult.decode(value, options)
44+
GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionSearchResult.decode(value, options)
4545
end
4646
end
4747

48-
defimpl Poison.Encoder, for: GoogleApi.CivicInfo.V2.Model.DivisionSearchResult do
48+
defimpl Poison.Encoder, for: GoogleApi.CivicInfo.V2.Model.CivicinfoApiprotosV2DivisionSearchResult do
4949
def encode(value, options) do
5050
GoogleApi.Gax.ModelBase.encode(value, options)
5151
end

0 commit comments

Comments
 (0)