diff --git a/clients/connectors/README.md b/clients/connectors/README.md index 4b6f9e29fa..1e6931afa1 100644 --- a/clients/connectors/README.md +++ b/clients/connectors/README.md @@ -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 ``` diff --git a/clients/connectors/lib/google_api/connectors/v1/api/projects.ex b/clients/connectors/lib/google_api/connectors/v1/api/projects.ex index bd49fc2fd3..5946989b29 100644 --- a/clients/connectors/lib/google_api/connectors/v1/api/projects.ex +++ b/clients/connectors/lib/google_api/connectors/v1/api/projects.ex @@ -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. diff --git a/clients/connectors/lib/google_api/connectors/v1/metadata.ex b/clients/connectors/lib/google_api/connectors/v1/metadata.ex index 313aad4af5..1ebbf394a8 100644 --- a/clients/connectors/lib/google_api/connectors/v1/metadata.ex +++ b/clients/connectors/lib/google_api/connectors/v1/metadata.ex @@ -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 diff --git a/clients/connectors/lib/google_api/connectors/v1/model/billing_config.ex b/clients/connectors/lib/google_api/connectors/v1/model/billing_config.ex new file mode 100644 index 0000000000..cd4886f3d6 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v1/model/billing_config.ex @@ -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 diff --git a/clients/connectors/lib/google_api/connectors/v1/model/connection.ex b/clients/connectors/lib/google_api/connectors/v1/model/connection.ex index 048192a72e..4d9ec3429a 100644 --- a/clients/connectors/lib/google_api/connectors/v1/model/connection.ex +++ b/clients/connectors/lib/google_api/connectors/v1/model/connection.ex @@ -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. @@ -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, @@ -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) diff --git a/clients/connectors/lib/google_api/connectors/v1/model/custom_connector.ex b/clients/connectors/lib/google_api/connectors/v1/model/custom_connector.ex index 7766dc4154..4ca587d138 100644 --- a/clients/connectors/lib/google_api/connectors/v1/model/custom_connector.ex +++ b/clients/connectors/lib/google_api/connectors/v1/model/custom_connector.ex @@ -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. @@ -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, @@ -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) diff --git a/clients/connectors/lib/google_api/connectors/v1/model/runtime_entity_schema.ex b/clients/connectors/lib/google_api/connectors/v1/model/runtime_entity_schema.ex index 8909065724..ffdf0245cc 100644 --- a/clients/connectors/lib/google_api/connectors/v1/model/runtime_entity_schema.ex +++ b/clients/connectors/lib/google_api/connectors/v1/model/runtime_entity_schema.ex @@ -24,6 +24,7 @@ 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 @@ -31,12 +32,14 @@ defmodule GoogleApi.Connectors.V1.Model.RuntimeEntitySchema do @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 diff --git a/clients/connectors/lib/google_api/connectors/v1/model/search_connection_instance.ex b/clients/connectors/lib/google_api/connectors/v1/model/search_connection_instance.ex new file mode 100644 index 0000000000..57d6adfe80 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v1/model/search_connection_instance.ex @@ -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 diff --git a/clients/connectors/lib/google_api/connectors/v1/model/search_connections_response.ex b/clients/connectors/lib/google_api/connectors/v1/model/search_connections_response.ex new file mode 100644 index 0000000000..629db2ddbd --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v1/model/search_connections_response.ex @@ -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 diff --git a/clients/connectors/lib/google_api/connectors/v2/metadata.ex b/clients/connectors/lib/google_api/connectors/v2/metadata.ex index 87e17ddc00..b8359691b1 100644 --- a/clients/connectors/lib/google_api/connectors/v2/metadata.ex +++ b/clients/connectors/lib/google_api/connectors/v2/metadata.ex @@ -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 diff --git a/clients/connectors/lib/google_api/connectors/v2/model/entity_type.ex b/clients/connectors/lib/google_api/connectors/v2/model/entity_type.ex index 5f60b91073..a8d8087c52 100644 --- a/clients/connectors/lib/google_api/connectors/v2/model/entity_type.ex +++ b/clients/connectors/lib/google_api/connectors/v2/model/entity_type.ex @@ -24,6 +24,7 @@ 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 @@ -31,12 +32,14 @@ defmodule GoogleApi.Connectors.V2.Model.EntityType do @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 diff --git a/clients/connectors/mix.exs b/clients/connectors/mix.exs index 62e9fe9449..ba8d3b7900 100644 --- a/clients/connectors/mix.exs +++ b/clients/connectors/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.Connectors.Mixfile do use Mix.Project - @version "0.6.1" + @version "0.7.0" def project() do [