From df5b4439a08fd0aba636644ff0da443c8933e5a5 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Mon, 1 Apr 2024 06:08:15 -0700 Subject: [PATCH] feat: Automated regeneration of Dataplex client (#11238) Auto-created at 2024-04-01 13:06:20 +0000 using the toys pull request generator. --- clients/dataplex/README.md | 2 +- .../google_api/dataplex/v1/api/projects.ex | 2 +- .../lib/google_api/dataplex/v1/metadata.ex | 2 +- ...gle_cloud_dataplex_v1_data_quality_rule.ex | 7 +++ ...ud_dataplex_v1_data_quality_rule_result.ex | 3 ++ ...plex_v1_data_quality_rule_sql_assertion.ex | 51 +++++++++++++++++++ clients/dataplex/mix.exs | 2 +- 7 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 clients/dataplex/lib/google_api/dataplex/v1/model/google_cloud_dataplex_v1_data_quality_rule_sql_assertion.ex diff --git a/clients/dataplex/README.md b/clients/dataplex/README.md index 35eb971185..efeb3e6e95 100644 --- a/clients/dataplex/README.md +++ b/clients/dataplex/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_dataplex, "~> 0.10"}] + [{:google_api_dataplex, "~> 0.11"}] end ``` diff --git a/clients/dataplex/lib/google_api/dataplex/v1/api/projects.ex b/clients/dataplex/lib/google_api/dataplex/v1/api/projects.ex index c7ccbf42ca..1c455afff3 100644 --- a/clients/dataplex/lib/google_api/dataplex/v1/api/projects.ex +++ b/clients/dataplex/lib/google_api/dataplex/v1/api/projects.ex @@ -4556,7 +4556,7 @@ defmodule GoogleApi.Dataplex.V1.Api.Projects do * `: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. A filter on the entries to return. Filters are case-sensitive. The request can be filtered by the following fields: entry_type, display_name. The comparison operators are =, !=, <, >, <=, >= (strings are compared according to lexical order) The logical operators AND, OR, NOT can be used in the filter. Example filter expressions: "display_name=AnExampleDisplayName" "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" "entry_type=projects/a* OR "entry_type=projects/k*" "NOT display_name=AnotherExampleDisplayName" + * `:filter` (*type:* `String.t`) - Optional. A filter on the entries to return. Filters are case-sensitive. The request can be filtered by the following fields: entry_type, entry_source.display_name. The comparison operators are =, !=, <, >, <=, >= (strings are compared according to lexical order) The logical operators AND, OR, NOT can be used in the filter. Wildcard "*" can be used, but for entry_type the full project id or number needs to be provided. Example filter expressions: "entry_source.display_name=AnExampleDisplayName" "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" "entry_type=projects/example-project/locations/us/entryTypes/a* OR entry_type=projects/another-project/locations/*" "NOT entry_source.display_name=AnotherExampleDisplayName" * `:pageSize` (*type:* `integer()`) - * `:pageToken` (*type:* `String.t`) - Optional. The pagination token returned by a previous request. * `opts` (*type:* `keyword()`) - Call options diff --git a/clients/dataplex/lib/google_api/dataplex/v1/metadata.ex b/clients/dataplex/lib/google_api/dataplex/v1/metadata.ex index 948985c596..742aef3c2f 100644 --- a/clients/dataplex/lib/google_api/dataplex/v1/metadata.ex +++ b/clients/dataplex/lib/google_api/dataplex/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Dataplex.V1 do API client metadata for GoogleApi.Dataplex.V1. """ - @discovery_revision "20240317" + @discovery_revision "20240325" def discovery_revision(), do: @discovery_revision end diff --git a/clients/dataplex/lib/google_api/dataplex/v1/model/google_cloud_dataplex_v1_data_quality_rule.ex b/clients/dataplex/lib/google_api/dataplex/v1/model/google_cloud_dataplex_v1_data_quality_rule.ex index ab3ddb3851..c1b6e7548d 100644 --- a/clients/dataplex/lib/google_api/dataplex/v1/model/google_cloud_dataplex_v1_data_quality_rule.ex +++ b/clients/dataplex/lib/google_api/dataplex/v1/model/google_cloud_dataplex_v1_data_quality_rule.ex @@ -31,6 +31,7 @@ defmodule GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRule do * `regexExpectation` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleRegexExpectation.t`, *default:* `nil`) - Row-level rule which evaluates whether each column value matches a specified regex. * `rowConditionExpectation` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleRowConditionExpectation.t`, *default:* `nil`) - Row-level rule which evaluates whether each row in a table passes the specified condition. * `setExpectation` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleSetExpectation.t`, *default:* `nil`) - Row-level rule which evaluates whether each column value is contained by a specified set. + * `sqlAssertion` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleSqlAssertion.t`, *default:* `nil`) - Aggregate rule which evaluates the number of rows returned for the provided statement. * `statisticRangeExpectation` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleStatisticRangeExpectation.t`, *default:* `nil`) - Aggregate rule which evaluates whether the column aggregate statistic lies between a specified range. * `tableConditionExpectation` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleTableConditionExpectation.t`, *default:* `nil`) - Aggregate rule which evaluates whether the provided expression is true for a table. * `threshold` (*type:* `float()`, *default:* `nil`) - Optional. The minimum ratio of passing_rows / total_rows required to pass this rule, with a range of 0.0, 1.0.0 indicates default value (i.e. 1.0).This field is only valid for row-level type rules. @@ -60,6 +61,8 @@ defmodule GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRule do :setExpectation => GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleSetExpectation.t() | nil, + :sqlAssertion => + GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleSqlAssertion.t() | nil, :statisticRangeExpectation => GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleStatisticRangeExpectation.t() | nil, @@ -98,6 +101,10 @@ defmodule GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRule do as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleSetExpectation ) + field(:sqlAssertion, + as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleSqlAssertion + ) + field(:statisticRangeExpectation, as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleStatisticRangeExpectation ) diff --git a/clients/dataplex/lib/google_api/dataplex/v1/model/google_cloud_dataplex_v1_data_quality_rule_result.ex b/clients/dataplex/lib/google_api/dataplex/v1/model/google_cloud_dataplex_v1_data_quality_rule_result.ex index 380b22fec2..af892c2595 100644 --- a/clients/dataplex/lib/google_api/dataplex/v1/model/google_cloud_dataplex_v1_data_quality_rule_result.ex +++ b/clients/dataplex/lib/google_api/dataplex/v1/model/google_cloud_dataplex_v1_data_quality_rule_result.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleResult ## Attributes + * `assertionRowCount` (*type:* `String.t`, *default:* `nil`) - Output only. The number of rows returned by the sql statement in the SqlAssertion rule.This field is only valid for SqlAssertion rules. * `evaluatedCount` (*type:* `String.t`, *default:* `nil`) - The number of rows a rule was evaluated against.This field is only valid for row-level type rules.Evaluated count can be configured to either include all rows (default) - with null rows automatically failing rule evaluation, or exclude null rows from the evaluated_count, by setting ignore_nulls = true. * `failingRowsQuery` (*type:* `String.t`, *default:* `nil`) - The query to find rows that did not pass this rule.This field is only valid for row-level type rules. * `nullCount` (*type:* `String.t`, *default:* `nil`) - The number of rows with null values in the specified column. @@ -33,6 +34,7 @@ defmodule GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleResult use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :assertionRowCount => String.t() | nil, :evaluatedCount => String.t() | nil, :failingRowsQuery => String.t() | nil, :nullCount => String.t() | nil, @@ -42,6 +44,7 @@ defmodule GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleResult :rule => GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRule.t() | nil } + field(:assertionRowCount) field(:evaluatedCount) field(:failingRowsQuery) field(:nullCount) diff --git a/clients/dataplex/lib/google_api/dataplex/v1/model/google_cloud_dataplex_v1_data_quality_rule_sql_assertion.ex b/clients/dataplex/lib/google_api/dataplex/v1/model/google_cloud_dataplex_v1_data_quality_rule_sql_assertion.ex new file mode 100644 index 0000000000..4361126472 --- /dev/null +++ b/clients/dataplex/lib/google_api/dataplex/v1/model/google_cloud_dataplex_v1_data_quality_rule_sql_assertion.ex @@ -0,0 +1,51 @@ +# 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.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleSqlAssertion do + @moduledoc """ + Queries for rows returned by the provided SQL statement. If any rows are are returned, this rule fails.The SQL statement needs to use BigQuery standard SQL syntax, and must not contain any semicolons.${data()} can be used to reference the rows being evaluated, i.e. the table after all additional filters (row filters, incremental data filters, sampling) are applied.Example: SELECT * FROM ${data()} WHERE price < 0 + + ## Attributes + + * `sqlStatement` (*type:* `String.t`, *default:* `nil`) - Optional. The SQL statement. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :sqlStatement => String.t() | nil + } + + field(:sqlStatement) +end + +defimpl Poison.Decoder, + for: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleSqlAssertion do + def decode(value, options) do + GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleSqlAssertion.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1DataQualityRuleSqlAssertion do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/dataplex/mix.exs b/clients/dataplex/mix.exs index ffc4058df9..be10c2ca83 100644 --- a/clients/dataplex/mix.exs +++ b/clients/dataplex/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.Dataplex.Mixfile do use Mix.Project - @version "0.10.0" + @version "0.11.0" def project() do [