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 Connectors client #11336

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/connectors/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_connectors, "~> 0.6"}]
[{:google_api_connectors, "~> 0.7"}]
end
```

Expand Down
78 changes: 78 additions & 0 deletions clients/connectors/lib/google_api/connectors/v1/api/projects.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,84 @@ defmodule GoogleApi.Connectors.V1.Api.Projects do
|> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V1.Model.Operation{}])
end

@doc """
Returns Top matching Connections for a given query.

## Parameters

* `connection` (*type:* `GoogleApi.Connectors.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. Parent resource of the Connection, of the form: `projects/*/locations/*/connections`
* `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").
* `:pageSize` (*type:* `integer()`) - Optional. The number of top matching connectors to return
* `:pageToken` (*type:* `String.t`) - Optional. page_token
* `:query` (*type:* `String.t`) - Required. The query against which the search needs to be done.
* `opts` (*type:* `keyword()`) - Call options

## Returns

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

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

@doc """
Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.Connectors.V1 do
API client metadata for GoogleApi.Connectors.V1.
"""

@discovery_revision "20240320"
@discovery_revision "20240415"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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.Connectors.V1.Model.BillingConfig do
@moduledoc """
Billing config for the connection.

## Attributes

* `billingCategory` (*type:* `String.t`, *default:* `nil`) - Output only. Billing category for the connector.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:billingCategory => String.t() | nil
}

field(:billingCategory)
end

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

defimpl Poison.Encoder, for: GoogleApi.Connectors.V1.Model.BillingConfig 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 @@ -22,6 +22,7 @@ defmodule GoogleApi.Connectors.V1.Model.Connection do
## Attributes

* `authConfig` (*type:* `GoogleApi.Connectors.V1.Model.AuthConfig.t`, *default:* `nil`) - Optional. Configuration for establishing the connection's authentication with an external system.
* `billingConfig` (*type:* `GoogleApi.Connectors.V1.Model.BillingConfig.t`, *default:* `nil`) - Output only. Billing config for the connection.
* `configVariables` (*type:* `list(GoogleApi.Connectors.V1.Model.ConfigVariable.t)`, *default:* `nil`) - Optional. Configuration for configuring the connection with an external system.
* `connectionRevision` (*type:* `String.t`, *default:* `nil`) - Output only. Connection revision. This field is only updated when the connection is created or updated by User.
* `connectorVersion` (*type:* `String.t`, *default:* `nil`) - Required. Connector version on which the connection is created. The format is: projects/*/locations/*/providers/*/connectors/*/versions/* Only global location is supported for ConnectorVersion resource.
Expand Down Expand Up @@ -54,6 +55,7 @@ defmodule GoogleApi.Connectors.V1.Model.Connection do

@type t :: %__MODULE__{
:authConfig => GoogleApi.Connectors.V1.Model.AuthConfig.t() | nil,
:billingConfig => GoogleApi.Connectors.V1.Model.BillingConfig.t() | nil,
:configVariables => list(GoogleApi.Connectors.V1.Model.ConfigVariable.t()) | nil,
:connectionRevision => String.t() | nil,
:connectorVersion => String.t() | nil,
Expand Down Expand Up @@ -84,6 +86,7 @@ defmodule GoogleApi.Connectors.V1.Model.Connection do
}

field(:authConfig, as: GoogleApi.Connectors.V1.Model.AuthConfig)
field(:billingConfig, as: GoogleApi.Connectors.V1.Model.BillingConfig)
field(:configVariables, as: GoogleApi.Connectors.V1.Model.ConfigVariable, type: :list)
field(:connectionRevision)
field(:connectorVersion)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ defmodule GoogleApi.Connectors.V1.Model.CustomConnector do

## Attributes

* `activeConnectorVersions` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Active connector versions.
* `activeConnectorVersions` (*type:* `list(String.t)`, *default:* `nil`) - Output only. Active connector versions.
* `allConnectorVersions` (*type:* `list(String.t)`, *default:* `nil`) - Output only. All connector versions.
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Created time.
* `customConnectorType` (*type:* `String.t`, *default:* `nil`) - Required. Type of the custom connector.
* `description` (*type:* `String.t`, *default:* `nil`) - Optional. Description of the resource.
Expand All @@ -36,6 +37,7 @@ defmodule GoogleApi.Connectors.V1.Model.CustomConnector do

@type t :: %__MODULE__{
:activeConnectorVersions => list(String.t()) | nil,
:allConnectorVersions => list(String.t()) | nil,
:createTime => DateTime.t() | nil,
:customConnectorType => String.t() | nil,
:description => String.t() | nil,
Expand All @@ -47,6 +49,7 @@ defmodule GoogleApi.Connectors.V1.Model.CustomConnector do
}

field(:activeConnectorVersions, type: :list)
field(:allConnectorVersions, type: :list)
field(:createTime, as: DateTime)
field(:customConnectorType)
field(:description)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,22 @@ defmodule GoogleApi.Connectors.V1.Model.RuntimeEntitySchema do
* `entity` (*type:* `String.t`, *default:* `nil`) - Output only. Name of the entity.
* `fields` (*type:* `list(GoogleApi.Connectors.V1.Model.Field.t)`, *default:* `nil`) - Output only. List of fields in the entity.
* `jsonSchema` (*type:* `GoogleApi.Connectors.V1.Model.JsonSchema.t`, *default:* `nil`) - Output only. JsonSchema representation of this entity's metadata
* `operations` (*type:* `list(String.t)`, *default:* `nil`) - List of operations supported by this entity
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:entity => String.t() | nil,
:fields => list(GoogleApi.Connectors.V1.Model.Field.t()) | nil,
:jsonSchema => GoogleApi.Connectors.V1.Model.JsonSchema.t() | nil
:jsonSchema => GoogleApi.Connectors.V1.Model.JsonSchema.t() | nil,
:operations => list(String.t()) | nil
}

field(:entity)
field(:fields, as: GoogleApi.Connectors.V1.Model.Field, type: :list)
field(:jsonSchema, as: GoogleApi.Connectors.V1.Model.JsonSchema)
field(:operations, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Connectors.V1.Model.RuntimeEntitySchema do
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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.Connectors.V1.Model.SearchConnectionInstance do
@moduledoc """
SearchConnectionInstance represents an instance of connector with specific fields

## Attributes

* `actionSchema` (*type:* `GoogleApi.Connectors.V1.Model.RuntimeActionSchema.t`, *default:* `nil`) - Output only. Schema of a runtime action.
* `connection` (*type:* `GoogleApi.Connectors.V1.Model.Connection.t`, *default:* `nil`) - Output only. Connection details
* `entitySchema` (*type:* `GoogleApi.Connectors.V1.Model.RuntimeEntitySchema.t`, *default:* `nil`) - Output only. Schema of a runtime entity.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:actionSchema => GoogleApi.Connectors.V1.Model.RuntimeActionSchema.t() | nil,
:connection => GoogleApi.Connectors.V1.Model.Connection.t() | nil,
:entitySchema => GoogleApi.Connectors.V1.Model.RuntimeEntitySchema.t() | nil
}

field(:actionSchema, as: GoogleApi.Connectors.V1.Model.RuntimeActionSchema)
field(:connection, as: GoogleApi.Connectors.V1.Model.Connection)
field(:entitySchema, as: GoogleApi.Connectors.V1.Model.RuntimeEntitySchema)
end

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

defimpl Poison.Encoder, for: GoogleApi.Connectors.V1.Model.SearchConnectionInstance 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,52 @@
# 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.Connectors.V1.Model.SearchConnectionsResponse do
@moduledoc """
Response message for Connectors.SearchConnections.

## Attributes

* `connections` (*type:* `list(GoogleApi.Connectors.V1.Model.SearchConnectionInstance.t)`, *default:* `nil`) - A list of connectors.
* `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Optional. page_token
* `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:connections => list(GoogleApi.Connectors.V1.Model.SearchConnectionInstance.t()) | nil,
:nextPageToken => String.t() | nil,
:unreachable => list(String.t()) | nil
}

field(:connections, as: GoogleApi.Connectors.V1.Model.SearchConnectionInstance, type: :list)
field(:nextPageToken)
field(:unreachable, type: :list)
end

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

defimpl Poison.Encoder, for: GoogleApi.Connectors.V1.Model.SearchConnectionsResponse 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 @@ -20,7 +20,7 @@ defmodule GoogleApi.Connectors.V2 do
API client metadata for GoogleApi.Connectors.V2.
"""

@discovery_revision "20240320"
@discovery_revision "20240415"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,22 @@ defmodule GoogleApi.Connectors.V2.Model.EntityType do
* `fields` (*type:* `list(GoogleApi.Connectors.V2.Model.Field.t)`, *default:* `nil`) - List containing metadata information about each field of the entity type.
* `jsonSchema` (*type:* `GoogleApi.Connectors.V2.Model.JsonSchema.t`, *default:* `nil`) - JsonSchema representation of this entity's schema
* `name` (*type:* `String.t`, *default:* `nil`) - The name of the entity type.
* `operations` (*type:* `list(String.t)`, *default:* `nil`) -
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:fields => list(GoogleApi.Connectors.V2.Model.Field.t()) | nil,
:jsonSchema => GoogleApi.Connectors.V2.Model.JsonSchema.t() | nil,
:name => String.t() | nil
:name => String.t() | nil,
:operations => list(String.t()) | nil
}

field(:fields, as: GoogleApi.Connectors.V2.Model.Field, type: :list)
field(:jsonSchema, as: GoogleApi.Connectors.V2.Model.JsonSchema)
field(:name)
field(:operations, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.EntityType do
Expand Down
2 changes: 1 addition & 1 deletion clients/connectors/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.Connectors.Mixfile do
use Mix.Project

@version "0.6.1"
@version "0.7.0"

def project() do
[
Expand Down
Loading