Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of NetworkConnectivity client #11361

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.4"}]
[{:google_api_network_connectivity, "~> 0.5"}]
end
```

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

@doc """
Creates a new RegionalEndpoint in a given project and location.

## Parameters

* `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server
* `parent` (*type:* `String.t`) - Required. The parent resource's name of the RegionalEndpoint.
* `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").
* `:regionalEndpointId` (*type:* `String.t`) - Required. Unique id of the Regional Endpoint to be created.
* `:requestId` (*type:* `String.t`) - Optional. An optional 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 for at least 60 minutes since the first request. 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 if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally 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).
* `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.RegionalEndpoint.t`) -
* `opts` (*type:* `keyword()`) - Call options

## Returns

* `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success
* `{:error, info}` on failure
"""
@spec networkconnectivity_projects_locations_regional_endpoints_create(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def networkconnectivity_projects_locations_regional_endpoints_create(
connection,
parent,
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,
:regionalEndpointId => :query,
:requestId => :query,
:body => :body
}

request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1/{+parent}/regionalEndpoints", %{
"parent" => URI.encode(parent, &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.GoogleLongrunningOperation{}]
)
end

@doc """
Deletes a single RegionalEndpoint.

## Parameters

* `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. The name of the RegionalEndpoint to delete.
* `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").
* `:requestId` (*type:* `String.t`) - Optional. An optional 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 for at least 60 minutes since the first request. 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 if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally 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).
* `opts` (*type:* `keyword()`) - Call options

## Returns

* `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success
* `{:error, info}` on failure
"""
@spec networkconnectivity_projects_locations_regional_endpoints_delete(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def networkconnectivity_projects_locations_regional_endpoints_delete(
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,
:requestId => :query
}

request =
Request.new()
|> Request.method(:delete)
|> Request.url("/v1/{+name}", %{
"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.GoogleLongrunningOperation{}]
)
end

@doc """
Gets details of a single RegionalEndpoint.

## Parameters

* `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. Name of the RegionalEndpoint resource to get. Format: `projects/{project}/locations/{location}/regionalEndpoints/{regional_endpoint}`
* `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").
* `opts` (*type:* `keyword()`) - Call options

## Returns

* `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.RegionalEndpoint{}}` on success
* `{:error, info}` on failure
"""
@spec networkconnectivity_projects_locations_regional_endpoints_get(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.NetworkConnectivity.V1.Model.RegionalEndpoint.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def networkconnectivity_projects_locations_regional_endpoints_get(
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
}

request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1/{+name}", %{
"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.RegionalEndpoint{}]
)
end

@doc """
Lists RegionalEndpoints in a given project and location.

## Parameters

* `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server
* `parent` (*type:* `String.t`) - Required. The parent resource's name of the RegionalEndpoint.
* `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`) - A filter expression that filters the results listed in the response.
* `:orderBy` (*type:* `String.t`) - Sort the results by a certain order.
* `:pageSize` (*type:* `integer()`) - Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
* `:pageToken` (*type:* `String.t`) - A page token.
* `opts` (*type:* `keyword()`) - Call options

## Returns

* `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.ListRegionalEndpointsResponse{}}` on success
* `{:error, info}` on failure
"""
@spec networkconnectivity_projects_locations_regional_endpoints_list(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.NetworkConnectivity.V1.Model.ListRegionalEndpointsResponse.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def networkconnectivity_projects_locations_regional_endpoints_list(
connection,
parent,
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,
:orderBy => :query,
:pageSize => :query,
:pageToken => :query
}

request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1/{+parent}/regionalEndpoints", %{
"parent" => URI.encode(parent, &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.ListRegionalEndpointsResponse{}]
)
end

@doc """
Deletes a single ServiceClass.

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 "20240228"
@discovery_revision "20240423"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConfig do

* `disableGlobalAccess` (*type:* `boolean()`, *default:* `nil`) - This is used in PSC consumer ForwardingRule to control whether the PSC endpoint can be accessed from another region.
* `network` (*type:* `String.t`, *default:* `nil`) - The resource path of the consumer network where PSC connections are allowed to be created in. Note, this network does not need be in the ConsumerPscConfig.project in the case of SharedVPC. Example: projects/{projectNumOrId}/global/networks/{networkId}.
* `producerInstanceId` (*type:* `String.t`, *default:* `nil`) - Immutable. An immutable identifier for the producer instance.
* `project` (*type:* `String.t`, *default:* `nil`) - The consumer project where PSC connections are allowed to be created in.
* `state` (*type:* `String.t`, *default:* `nil`) - Output only. Overall state of PSC Connections management for this consumer psc config.
"""
Expand All @@ -32,12 +33,14 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConfig do
@type t :: %__MODULE__{
:disableGlobalAccess => boolean() | nil,
:network => String.t() | nil,
:producerInstanceId => String.t() | nil,
:project => String.t() | nil,
:state => String.t() | nil
}

field(:disableGlobalAccess)
field(:network)
field(:producerInstanceId)
field(:project)
field(:state)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConnection do
* `gceOperation` (*type:* `String.t`, *default:* `nil`) - The last Compute Engine operation to setup PSC connection.
* `ip` (*type:* `String.t`, *default:* `nil`) - The IP literal allocated on the consumer network for the PSC forwarding rule that is created to connect to the producer service attachment in this service connection map.
* `network` (*type:* `String.t`, *default:* `nil`) - The consumer network whose PSC forwarding rule is connected to the service attachments in this service connection map. Note that the network could be on a different project (shared VPC).
* `producerInstanceId` (*type:* `String.t`, *default:* `nil`) - Immutable. An immutable identifier for the producer instance.
* `project` (*type:* `String.t`, *default:* `nil`) - The consumer project whose PSC forwarding rule is connected to the service attachments in this service connection map.
* `pscConnectionId` (*type:* `String.t`, *default:* `nil`) - The PSC connection id of the PSC forwarding rule connected to the service attachments in this service connection map.
* `selectedSubnetwork` (*type:* `String.t`, *default:* `nil`) - Output only. The URI of the selected subnetwork selected to allocate IP address for this connection.
Expand All @@ -45,6 +46,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConnection do
:gceOperation => String.t() | nil,
:ip => String.t() | nil,
:network => String.t() | nil,
:producerInstanceId => String.t() | nil,
:project => String.t() | nil,
:pscConnectionId => String.t() | nil,
:selectedSubnetwork => String.t() | nil,
Expand All @@ -59,6 +61,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConnection do
field(:gceOperation)
field(:ip)
field(:network)
field(:producerInstanceId)
field(:project)
field(:pscConnectionId)
field(:selectedSubnetwork)
Expand Down
Loading
Loading