From f901bb757474134c0f94e7ef1dbe0312d4a9935e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 7 Nov 2024 13:11:24 +0000 Subject: [PATCH] feat: Automated regeneration of NetworkConnectivity client --- clients/network_connectivity/README.md | 2 +- .../network_connectivity/v1/api/projects.ex | 82 +++++++++++++++++++ .../network_connectivity/v1/metadata.ex | 2 +- .../v1/model/hub_status_entry.ex | 53 ++++++++++++ .../v1/model/linked_producer_vpc_network.ex | 5 +- .../v1/model/psc_propagation_status.ex | 64 +++++++++++++++ .../v1/model/query_hub_status_response.ex | 50 +++++++++++ .../v1/model/service_class.ex | 2 +- .../v1/model/service_connection_map.ex | 2 +- .../v1/model/service_connection_policy.ex | 2 +- .../v1/model/service_connection_token.ex | 2 +- .../network_connectivity/v1/model/spoke.ex | 2 +- clients/network_connectivity/mix.exs | 2 +- 13 files changed, 261 insertions(+), 9 deletions(-) create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/hub_status_entry.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/psc_propagation_status.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/query_hub_status_response.ex diff --git a/clients/network_connectivity/README.md b/clients/network_connectivity/README.md index f680fe3557..ea3b1ec2b7 100644 --- a/clients/network_connectivity/README.md +++ b/clients/network_connectivity/README.md @@ -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 ``` diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/api/projects.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/api/projects.ex index 6779bba614..a99763d7e7 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/api/projects.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/api/projects.ex @@ -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. diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/metadata.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/metadata.ex index 055c35d58c..b2968d001b 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/metadata.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/metadata.ex @@ -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 diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/hub_status_entry.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/hub_status_entry.ex new file mode 100644 index 0000000000..88d4d6e0d7 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/hub_status_entry.ex @@ -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 diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/linked_producer_vpc_network.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/linked_producer_vpc_network.ex index 27e2776b7e..3248d4028a 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/linked_producer_vpc_network.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/linked_producer_vpc_network.ex @@ -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. @@ -32,6 +33,7 @@ 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, @@ -39,6 +41,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.LinkedProducerVpcNetwork do } field(:excludeExportRanges, type: :list) + field(:includeExportRanges, type: :list) field(:network) field(:peering) field(:producerNetwork) diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/psc_propagation_status.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/psc_propagation_status.ex new file mode 100644 index 0000000000..374125b86c --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/psc_propagation_status.ex @@ -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 diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/query_hub_status_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/query_hub_status_response.ex new file mode 100644 index 0000000000..729c697dde --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/query_hub_status_response.ex @@ -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 diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_class.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_class.ex index ae024206a2..4c78712b3c 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_class.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_class.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.ServiceClass do @moduledoc """ - The ServiceClass resource. Next id: 9 + The ServiceClass resource. ## Attributes diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_map.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_map.ex index 67938b4422..68dcd571d5 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_map.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_map.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionMap do @moduledoc """ - The ServiceConnectionMap resource. Next id: 15 + The ServiceConnectionMap resource. ## Attributes diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_policy.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_policy.ex index cdc6f8bca1..6f459ffd2f 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_policy.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_policy.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionPolicy do @moduledoc """ - The ServiceConnectionPolicy resource. Next id: 12 + The ServiceConnectionPolicy resource. ## Attributes diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_token.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_token.ex index 70e456cde7..0401ffd0a5 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_token.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_token.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionToken do @moduledoc """ - The ServiceConnectionToken resource. Next id: 10 + The ServiceConnectionToken resource. ## Attributes diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke.ex index 91a1561857..a3965c5054 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke.ex @@ -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`. diff --git a/clients/network_connectivity/mix.exs b/clients/network_connectivity/mix.exs index f8d94f962f..9779cda74d 100644 --- a/clients/network_connectivity/mix.exs +++ b/clients/network_connectivity/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.NetworkConnectivity.Mixfile do use Mix.Project - @version "0.10.0" + @version "0.11.0" def project() do [