Skip to content

Commit 07ebd6d

Browse files
feat: Automated regeneration of NetworkConnectivity client (googleapis#13101)
Auto-created at 2025-03-06 13:11:33 +0000 using the toys pull request generator.
1 parent 0da4ffe commit 07ebd6d

File tree

9 files changed

+270
-3
lines changed

9 files changed

+270
-3
lines changed

clients/network_connectivity/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_network_connectivity, "~> 0.11"}]
14+
[{:google_api_network_connectivity, "~> 0.12"}]
1515
end
1616
```
1717

clients/network_connectivity/lib/google_api/network_connectivity/v1/api/projects.ex

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,80 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do
247247
)
248248
end
249249

250+
@doc """
251+
Accepts a proposal to update a Network Connectivity Center spoke in a hub.
252+
253+
## Parameters
254+
255+
* `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server
256+
* `name` (*type:* `String.t`) - Required. The name of the hub to accept spoke update.
257+
* `optional_params` (*type:* `keyword()`) - Optional parameters
258+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
259+
* `:access_token` (*type:* `String.t`) - OAuth access token.
260+
* `:alt` (*type:* `String.t`) - Data format for response.
261+
* `:callback` (*type:* `String.t`) - JSONP
262+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
263+
* `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
264+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
265+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
266+
* `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
267+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
268+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
269+
* `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.AcceptSpokeUpdateRequest.t`) -
270+
* `opts` (*type:* `keyword()`) - Call options
271+
272+
## Returns
273+
274+
* `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success
275+
* `{:error, info}` on failure
276+
"""
277+
@spec networkconnectivity_projects_locations_global_hubs_accept_spoke_update(
278+
Tesla.Env.client(),
279+
String.t(),
280+
keyword(),
281+
keyword()
282+
) ::
283+
{:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()}
284+
| {:ok, Tesla.Env.t()}
285+
| {:ok, list()}
286+
| {:error, any()}
287+
def networkconnectivity_projects_locations_global_hubs_accept_spoke_update(
288+
connection,
289+
name,
290+
optional_params \\ [],
291+
opts \\ []
292+
) do
293+
optional_params_config = %{
294+
:"$.xgafv" => :query,
295+
:access_token => :query,
296+
:alt => :query,
297+
:callback => :query,
298+
:fields => :query,
299+
:key => :query,
300+
:oauth_token => :query,
301+
:prettyPrint => :query,
302+
:quotaUser => :query,
303+
:uploadType => :query,
304+
:upload_protocol => :query,
305+
:body => :body
306+
}
307+
308+
request =
309+
Request.new()
310+
|> Request.method(:post)
311+
|> Request.url("/v1/{+name}:acceptSpokeUpdate", %{
312+
"name" => URI.encode(name, &URI.char_unreserved?/1)
313+
})
314+
|> Request.add_optional_params(optional_params_config, optional_params)
315+
|> Request.library_version(@library_version)
316+
317+
connection
318+
|> Connection.execute(request)
319+
|> Response.decode(
320+
opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}]
321+
)
322+
end
323+
250324
@doc """
251325
Creates a new Network Connectivity Center hub in the specified project.
252326
@@ -939,6 +1013,80 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do
9391013
)
9401014
end
9411015

1016+
@doc """
1017+
Rejects a proposal to update a Network Connectivity Center spoke in a hub.
1018+
1019+
## Parameters
1020+
1021+
* `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server
1022+
* `name` (*type:* `String.t`) - Required. The name of the hub to reject spoke update.
1023+
* `optional_params` (*type:* `keyword()`) - Optional parameters
1024+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
1025+
* `:access_token` (*type:* `String.t`) - OAuth access token.
1026+
* `:alt` (*type:* `String.t`) - Data format for response.
1027+
* `:callback` (*type:* `String.t`) - JSONP
1028+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
1029+
* `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
1030+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
1031+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
1032+
* `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
1033+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
1034+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
1035+
* `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.RejectSpokeUpdateRequest.t`) -
1036+
* `opts` (*type:* `keyword()`) - Call options
1037+
1038+
## Returns
1039+
1040+
* `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success
1041+
* `{:error, info}` on failure
1042+
"""
1043+
@spec networkconnectivity_projects_locations_global_hubs_reject_spoke_update(
1044+
Tesla.Env.client(),
1045+
String.t(),
1046+
keyword(),
1047+
keyword()
1048+
) ::
1049+
{:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()}
1050+
| {:ok, Tesla.Env.t()}
1051+
| {:ok, list()}
1052+
| {:error, any()}
1053+
def networkconnectivity_projects_locations_global_hubs_reject_spoke_update(
1054+
connection,
1055+
name,
1056+
optional_params \\ [],
1057+
opts \\ []
1058+
) do
1059+
optional_params_config = %{
1060+
:"$.xgafv" => :query,
1061+
:access_token => :query,
1062+
:alt => :query,
1063+
:callback => :query,
1064+
:fields => :query,
1065+
:key => :query,
1066+
:oauth_token => :query,
1067+
:prettyPrint => :query,
1068+
:quotaUser => :query,
1069+
:uploadType => :query,
1070+
:upload_protocol => :query,
1071+
:body => :body
1072+
}
1073+
1074+
request =
1075+
Request.new()
1076+
|> Request.method(:post)
1077+
|> Request.url("/v1/{+name}:rejectSpokeUpdate", %{
1078+
"name" => URI.encode(name, &URI.char_unreserved?/1)
1079+
})
1080+
|> Request.add_optional_params(optional_params_config, optional_params)
1081+
|> Request.library_version(@library_version)
1082+
1083+
connection
1084+
|> Connection.execute(request)
1085+
|> Response.decode(
1086+
opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}]
1087+
)
1088+
end
1089+
9421090
@doc """
9431091
Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
9441092

clients/network_connectivity/lib/google_api/network_connectivity/v1/metadata.ex

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

23-
@discovery_revision "20250219"
23+
@discovery_revision "20250226"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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.NetworkConnectivity.V1.Model.AcceptSpokeUpdateRequest do
19+
@moduledoc """
20+
The request for HubService.AcceptSpokeUpdate.
21+
22+
## Attributes
23+
24+
* `requestId` (*type:* `String.t`, *default:* `nil`) - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
25+
* `spokeEtag` (*type:* `String.t`, *default:* `nil`) - Required. The etag of the spoke to accept update.
26+
* `spokeUri` (*type:* `String.t`, *default:* `nil`) - Required. The URI of the spoke to accept update.
27+
"""
28+
29+
use GoogleApi.Gax.ModelBase
30+
31+
@type t :: %__MODULE__{
32+
:requestId => String.t() | nil,
33+
:spokeEtag => String.t() | nil,
34+
:spokeUri => String.t() | nil
35+
}
36+
37+
field(:requestId)
38+
field(:spokeEtag)
39+
field(:spokeUri)
40+
end
41+
42+
defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.AcceptSpokeUpdateRequest do
43+
def decode(value, options) do
44+
GoogleApi.NetworkConnectivity.V1.Model.AcceptSpokeUpdateRequest.decode(value, options)
45+
end
46+
end
47+
48+
defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.AcceptSpokeUpdateRequest do
49+
def encode(value, options) do
50+
GoogleApi.Gax.ModelBase.encode(value, options)
51+
end
52+
end

clients/network_connectivity/lib/google_api/network_connectivity/v1/model/linked_producer_vpc_network.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.LinkedProducerVpcNetwork do
2626
* `network` (*type:* `String.t`, *default:* `nil`) - Immutable. The URI of the Service Consumer VPC that the Producer VPC is peered with.
2727
* `peering` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the VPC peering between the Service Consumer VPC and the Producer VPC (defined in the Tenant project) which is added to the NCC hub. This peering must be in ACTIVE state.
2828
* `producerNetwork` (*type:* `String.t`, *default:* `nil`) - Output only. The URI of the Producer VPC.
29+
* `proposedIncludeExportRanges` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The proposed include export IP ranges waiting for hub administration's approval.
2930
* `serviceConsumerVpcSpoke` (*type:* `String.t`, *default:* `nil`) - Output only. The Service Consumer Network spoke.
3031
"""
3132

@@ -37,6 +38,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.LinkedProducerVpcNetwork do
3738
:network => String.t() | nil,
3839
:peering => String.t() | nil,
3940
:producerNetwork => String.t() | nil,
41+
:proposedIncludeExportRanges => list(String.t()) | nil,
4042
:serviceConsumerVpcSpoke => String.t() | nil
4143
}
4244

@@ -45,6 +47,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.LinkedProducerVpcNetwork do
4547
field(:network)
4648
field(:peering)
4749
field(:producerNetwork)
50+
field(:proposedIncludeExportRanges, type: :list)
4851
field(:serviceConsumerVpcSpoke)
4952
end
5053

clients/network_connectivity/lib/google_api/network_connectivity/v1/model/linked_vpc_network.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.LinkedVpcNetwork do
2424
* `excludeExportRanges` (*type:* `list(String.t)`, *default:* `nil`) - Optional. IP ranges encompassing the subnets to be excluded from peering.
2525
* `includeExportRanges` (*type:* `list(String.t)`, *default:* `nil`) - Optional. IP ranges allowed to be included from peering.
2626
* `producerVpcSpokes` (*type:* `list(String.t)`, *default:* `nil`) - Output only. The list of Producer VPC spokes that this VPC spoke is a service consumer VPC spoke for. These producer VPCs are connected through VPC peering to this spoke's backing VPC network. Because they are directly connected throuh VPC peering, NCC export filters do not apply between the service consumer VPC spoke and any of its producer VPC spokes. This VPC spoke cannot be deleted as long as any of these producer VPC spokes are connected to the NCC Hub.
27+
* `proposedIncludeExportRanges` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The proposed include export IP ranges waiting for hub administration's approval.
2728
* `uri` (*type:* `String.t`, *default:* `nil`) - Required. The URI of the VPC network resource.
2829
"""
2930

@@ -33,12 +34,14 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.LinkedVpcNetwork do
3334
:excludeExportRanges => list(String.t()) | nil,
3435
:includeExportRanges => list(String.t()) | nil,
3536
:producerVpcSpokes => list(String.t()) | nil,
37+
:proposedIncludeExportRanges => list(String.t()) | nil,
3638
:uri => String.t() | nil
3739
}
3840

3941
field(:excludeExportRanges, type: :list)
4042
field(:includeExportRanges, type: :list)
4143
field(:producerVpcSpokes, type: :list)
44+
field(:proposedIncludeExportRanges, type: :list)
4245
field(:uri)
4346
end
4447

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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.NetworkConnectivity.V1.Model.RejectSpokeUpdateRequest do
19+
@moduledoc """
20+
The request for HubService.RejectSpokeUpdate.
21+
22+
## Attributes
23+
24+
* `details` (*type:* `String.t`, *default:* `nil`) - Optional. Additional information provided by the hub administrator.
25+
* `requestId` (*type:* `String.t`, *default:* `nil`) - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
26+
* `spokeEtag` (*type:* `String.t`, *default:* `nil`) - Required. The etag of the spoke to reject update.
27+
* `spokeUri` (*type:* `String.t`, *default:* `nil`) - Required. The URI of the spoke to reject update.
28+
"""
29+
30+
use GoogleApi.Gax.ModelBase
31+
32+
@type t :: %__MODULE__{
33+
:details => String.t() | nil,
34+
:requestId => String.t() | nil,
35+
:spokeEtag => String.t() | nil,
36+
:spokeUri => String.t() | nil
37+
}
38+
39+
field(:details)
40+
field(:requestId)
41+
field(:spokeEtag)
42+
field(:spokeUri)
43+
end
44+
45+
defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.RejectSpokeUpdateRequest do
46+
def decode(value, options) do
47+
GoogleApi.NetworkConnectivity.V1.Model.RejectSpokeUpdateRequest.decode(value, options)
48+
end
49+
end
50+
51+
defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.RejectSpokeUpdateRequest do
52+
def encode(value, options) do
53+
GoogleApi.Gax.ModelBase.encode(value, options)
54+
end
55+
end

clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke.ex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.Spoke do
2323
2424
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the spoke was created.
2525
* `description` (*type:* `String.t`, *default:* `nil`) - Optional. An optional description of the spoke.
26+
* `etag` (*type:* `String.t`, *default:* `nil`) - Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
27+
* `fieldPathsPendingUpdate` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The list of fields waiting for hub administration's approval.
2628
* `group` (*type:* `String.t`, *default:* `nil`) - Optional. The name of the group that this spoke is associated with.
2729
* `hub` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the hub that this spoke is attached to.
2830
* `labels` (*type:* `map()`, *default:* `nil`) - Optional labels in key-value pair format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
@@ -44,6 +46,8 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.Spoke do
4446
@type t :: %__MODULE__{
4547
:createTime => DateTime.t() | nil,
4648
:description => String.t() | nil,
49+
:etag => String.t() | nil,
50+
:fieldPathsPendingUpdate => list(String.t()) | nil,
4751
:group => String.t() | nil,
4852
:hub => String.t() | nil,
4953
:labels => map() | nil,
@@ -65,6 +69,8 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.Spoke do
6569

6670
field(:createTime, as: DateTime)
6771
field(:description)
72+
field(:etag)
73+
field(:fieldPathsPendingUpdate, type: :list)
6874
field(:group)
6975
field(:hub)
7076
field(:labels, type: :map)

clients/network_connectivity/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
defmodule GoogleApi.NetworkConnectivity.Mixfile do
1919
use Mix.Project
2020

21-
@version "0.11.2"
21+
@version "0.12.0"
2222

2323
def project() do
2424
[

0 commit comments

Comments
 (0)