Skip to content

Commit

Permalink
feat: Automated regeneration of NetworkConnectivity client
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Nov 7, 2024
1 parent 4c85b29 commit f901bb7
Show file tree
Hide file tree
Showing 13 changed files with 261 additions and 9 deletions.
2 changes: 1 addition & 1 deletion clients/network_connectivity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding

```elixir
def deps do
[{:google_api_network_connectivity, "~> 0.10"}]
[{:google_api_network_connectivity, "~> 0.11"}]
end
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,88 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do
)
end

@doc """
Query PSC propagation status the status of a Network Connectivity Center hub.
## Parameters
* `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. The name of the hub.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
* `:alt` (*type:* `String.t`) - Data format for response.
* `:callback` (*type:* `String.t`) - JSONP
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
* `: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.
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
* `: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.
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:filter` (*type:* `String.t`) - Optional. An expression that filters the list of results. The filter can be used to filter the results by the following fields: * psc_propagation_status.source_spoke * psc_propagation_status.source_group * psc_propagation_status.source_forwarding_rule * psc_propagation_status.target_spoke * psc_propagation_status.target_group * psc_propagation_status.code * psc_propagation_status.message
* `:groupBy` (*type:* `String.t`) - Optional. A field that counts are grouped by. A comma-separated list of any of these fields: * psc_propagation_status.source_spoke * psc_propagation_status.source_group * psc_propagation_status.source_forwarding_rule * psc_propagation_status.target_spoke * psc_propagation_status.target_group * psc_propagation_status.code
* `:orderBy` (*type:* `String.t`) - Optional. Sort the results in the ascending order by specific fields returned in the response. A comma-separated list of any of these fields: * psc_propagation_status.source_spoke * psc_propagation_status.source_group * psc_propagation_status.source_forwarding_rule * psc_propagation_status.target_spoke * psc_propagation_status.target_group * psc_propagation_status.code If `group_by` is set, the value of the `order_by` field must be the same as or a subset of the `group_by` field.
* `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return per page.
* `:pageToken` (*type:* `String.t`) - Optional. The page token.
* `opts` (*type:* `keyword()`) - Call options
## Returns
* `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.QueryHubStatusResponse{}}` on success
* `{:error, info}` on failure
"""
@spec networkconnectivity_projects_locations_global_hubs_query_status(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.NetworkConnectivity.V1.Model.QueryHubStatusResponse.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def networkconnectivity_projects_locations_global_hubs_query_status(
connection,
name,
optional_params \\ [],
opts \\ []
) do
optional_params_config = %{
:"$.xgafv" => :query,
:access_token => :query,
:alt => :query,
:callback => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query,
:filter => :query,
:groupBy => :query,
:orderBy => :query,
:pageSize => :query,
:pageToken => :query
}

request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1/{+name}:queryStatus", %{
"name" => URI.encode(name, &URI.char_unreserved?/1)
})
|> Request.add_optional_params(optional_params_config, optional_params)
|> Request.library_version(@library_version)

connection
|> Connection.execute(request)
|> Response.decode(
opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.QueryHubStatusResponse{}]
)
end

@doc """
Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able to connect to other spokes that are attached to the hub.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.NetworkConnectivity.V1 do
API client metadata for GoogleApi.NetworkConnectivity.V1.
"""

@discovery_revision "20241009"
@discovery_revision "20241030"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.NetworkConnectivity.V1.Model.HubStatusEntry do
@moduledoc """
The hub status entry.
## Attributes
* `count` (*type:* `integer()`, *default:* `nil`) - The number of status. If group_by is not set in the request, the default is 1.
* `groupBy` (*type:* `String.t`, *default:* `nil`) - The same group_by field from the request.
* `pscPropagationStatus` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.PscPropagationStatus.t`, *default:* `nil`) - The PSC propagation status.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:count => integer() | nil,
:groupBy => String.t() | nil,
:pscPropagationStatus =>
GoogleApi.NetworkConnectivity.V1.Model.PscPropagationStatus.t() | nil
}

field(:count)
field(:groupBy)
field(:pscPropagationStatus, as: GoogleApi.NetworkConnectivity.V1.Model.PscPropagationStatus)
end

defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.HubStatusEntry do
def decode(value, options) do
GoogleApi.NetworkConnectivity.V1.Model.HubStatusEntry.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.HubStatusEntry do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@

defmodule GoogleApi.NetworkConnectivity.V1.Model.LinkedProducerVpcNetwork do
@moduledoc """
Next ID: 7
## Attributes
* `excludeExportRanges` (*type:* `list(String.t)`, *default:* `nil`) - Optional. IP ranges encompassing the subnets to be excluded from peering.
* `includeExportRanges` (*type:* `list(String.t)`, *default:* `nil`) - Optional. IP ranges allowed to be included from peering.
* `network` (*type:* `String.t`, *default:* `nil`) - Immutable. The URI of the Service Consumer VPC that the Producer VPC is peered with.
* `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.
* `producerNetwork` (*type:* `String.t`, *default:* `nil`) - Output only. The URI of the Producer VPC.
Expand All @@ -32,13 +33,15 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.LinkedProducerVpcNetwork do

@type t :: %__MODULE__{
:excludeExportRanges => list(String.t()) | nil,
:includeExportRanges => list(String.t()) | nil,
:network => String.t() | nil,
:peering => String.t() | nil,
:producerNetwork => String.t() | nil,
:serviceConsumerVpcSpoke => String.t() | nil
}

field(:excludeExportRanges, type: :list)
field(:includeExportRanges, type: :list)
field(:network)
field(:peering)
field(:producerNetwork)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.NetworkConnectivity.V1.Model.PscPropagationStatus do
@moduledoc """
The PSC propagation status in a hub.
## Attributes
* `code` (*type:* `String.t`, *default:* `nil`) - The propagation status.
* `message` (*type:* `String.t`, *default:* `nil`) - The human-readable summary of the PSC connection propagation status.
* `sourceForwardingRule` (*type:* `String.t`, *default:* `nil`) - The name of the forwarding rule exported to the hub.
* `sourceGroup` (*type:* `String.t`, *default:* `nil`) - The name of the group that the source spoke belongs to.
* `sourceSpoke` (*type:* `String.t`, *default:* `nil`) - The name of the spoke that the source forwarding rule belongs to.
* `targetGroup` (*type:* `String.t`, *default:* `nil`) - The name of the group that the target spoke belongs to.
* `targetSpoke` (*type:* `String.t`, *default:* `nil`) - The name of the spoke that the source forwarding rule propagates to.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:code => String.t() | nil,
:message => String.t() | nil,
:sourceForwardingRule => String.t() | nil,
:sourceGroup => String.t() | nil,
:sourceSpoke => String.t() | nil,
:targetGroup => String.t() | nil,
:targetSpoke => String.t() | nil
}

field(:code)
field(:message)
field(:sourceForwardingRule)
field(:sourceGroup)
field(:sourceSpoke)
field(:targetGroup)
field(:targetSpoke)
end

defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.PscPropagationStatus do
def decode(value, options) do
GoogleApi.NetworkConnectivity.V1.Model.PscPropagationStatus.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.PscPropagationStatus do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.NetworkConnectivity.V1.Model.QueryHubStatusResponse do
@moduledoc """
The response for HubService.QueryHubStatus.
## Attributes
* `hubStatusEntries` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.HubStatusEntry.t)`, *default:* `nil`) - The list of hub status.
* `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:hubStatusEntries =>
list(GoogleApi.NetworkConnectivity.V1.Model.HubStatusEntry.t()) | nil,
:nextPageToken => String.t() | nil
}

field(:hubStatusEntries, as: GoogleApi.NetworkConnectivity.V1.Model.HubStatusEntry, type: :list)
field(:nextPageToken)
end

defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.QueryHubStatusResponse do
def decode(value, options) do
GoogleApi.NetworkConnectivity.V1.Model.QueryHubStatusResponse.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.QueryHubStatusResponse do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

defmodule GoogleApi.NetworkConnectivity.V1.Model.ServiceClass do
@moduledoc """
The ServiceClass resource. Next id: 9
The ServiceClass resource.
## Attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

defmodule GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionMap do
@moduledoc """
The ServiceConnectionMap resource. Next id: 15
The ServiceConnectionMap resource.
## Attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

defmodule GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionPolicy do
@moduledoc """
The ServiceConnectionPolicy resource. Next id: 12
The ServiceConnectionPolicy resource.
## Attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

defmodule GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionToken do
@moduledoc """
The ServiceConnectionToken resource. Next id: 10
The ServiceConnectionToken resource.
## Attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.Spoke do
* `linkedVpcNetwork` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.LinkedVpcNetwork.t`, *default:* `nil`) - Optional. VPC network that is associated with the spoke.
* `linkedVpnTunnels` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.LinkedVpnTunnels.t`, *default:* `nil`) - VPN tunnels that are associated with the spoke.
* `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the spoke. Spoke names must be unique. They use the following form: `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
* `reasons` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.StateReason.t)`, *default:* `nil`) - Output only. The reasons for current state of the spoke. Only present when the spoke is in the `INACTIVE` state.
* `reasons` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.StateReason.t)`, *default:* `nil`) - Output only. The reasons for current state of the spoke.
* `spokeType` (*type:* `String.t`, *default:* `nil`) - Output only. The type of resource associated with the spoke.
* `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current lifecycle state of this spoke.
* `uniqueId` (*type:* `String.t`, *default:* `nil`) - Output only. The Google-generated UUID for the spoke. This value is unique across all spoke resources. If a spoke is deleted and another with the same name is created, the new spoke is assigned a different `unique_id`.
Expand Down
2 changes: 1 addition & 1 deletion clients/network_connectivity/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.NetworkConnectivity.Mixfile do
use Mix.Project

@version "0.10.0"
@version "0.11.0"

def project() do
[
Expand Down

0 comments on commit f901bb7

Please sign in to comment.