From fe9becbf13efb7c6136f597478ee4e278952b6bb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 12 Mar 2024 01:16:30 +0000 Subject: [PATCH] feat: Automated regeneration of ChromeUXReport client --- .../chrome_ux_report/v1/api/records.ex | 61 +++++++++++++++++++ .../chrome_ux_report/v1/metadata.ex | 2 +- .../v1/model/fraction_timeseries.ex | 46 ++++++++++++++ .../chrome_ux_report/v1/model/history_key.ex | 52 ++++++++++++++++ .../v1/model/history_record.ex | 55 +++++++++++++++++ .../chrome_ux_report/v1/model/metric.ex | 5 +- .../v1/model/metric_timeseries.ex | 55 +++++++++++++++++ .../v1/model/query_history_request.ex | 55 +++++++++++++++++ .../v1/model/query_history_response.ex | 49 +++++++++++++++ .../chrome_ux_report/v1/model/record.ex | 2 +- .../v1/model/timeseries_bin.ex | 52 ++++++++++++++++ .../v1/model/timeseries_percentiles.ex | 46 ++++++++++++++ 12 files changed, 477 insertions(+), 3 deletions(-) create mode 100644 clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/fraction_timeseries.ex create mode 100644 clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/history_key.ex create mode 100644 clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/history_record.ex create mode 100644 clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/metric_timeseries.ex create mode 100644 clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/query_history_request.ex create mode 100644 clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/query_history_response.ex create mode 100644 clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/timeseries_bin.ex create mode 100644 clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/timeseries_percentiles.ex diff --git a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/api/records.ex b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/api/records.ex index 81e09984f0..196dbca06a 100644 --- a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/api/records.ex +++ b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/api/records.ex @@ -25,6 +25,67 @@ defmodule GoogleApi.ChromeUXReport.V1.Api.Records do @library_version Mix.Project.config() |> Keyword.get(:version, "") + @doc """ + Queries the Chrome User Experience Report for a timeseries `history record` for a given site. Returns a `history record` that contains one or more `metric timeseries` corresponding to performance data about the requested site. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ChromeUXReport.V1.Connection.t`) - Connection to server + * `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"). + * `:body` (*type:* `GoogleApi.ChromeUXReport.V1.Model.QueryHistoryRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ChromeUXReport.V1.Model.QueryHistoryResponse{}}` on success + * `{:error, info}` on failure + """ + @spec chromeuxreport_records_query_history_record(Tesla.Env.client(), keyword(), keyword()) :: + {:ok, GoogleApi.ChromeUXReport.V1.Model.QueryHistoryResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def chromeuxreport_records_query_history_record(connection, 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, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/records:queryHistoryRecord", %{}) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.ChromeUXReport.V1.Model.QueryHistoryResponse{}] + ) + end + @doc """ Queries the Chrome User Experience for a single `record` for a given site. Returns a `record` that contains one or more `metrics` corresponding to performance data about the requested site. diff --git a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/metadata.ex b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/metadata.ex index b7fbdb85d7..6b652834c6 100644 --- a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/metadata.ex +++ b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.ChromeUXReport.V1 do API client metadata for GoogleApi.ChromeUXReport.V1. """ - @discovery_revision "20220919" + @discovery_revision "20240307" def discovery_revision(), do: @discovery_revision end diff --git a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/fraction_timeseries.ex b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/fraction_timeseries.ex new file mode 100644 index 0000000000..9c96da8169 --- /dev/null +++ b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/fraction_timeseries.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.ChromeUXReport.V1.Model.FractionTimeseries do + @moduledoc """ + For enum metrics, provides fraction timeseries which add up to approximately 1.0 per entry (k-th element into the repeated fractions field for any k <= len) across fraction_timeseries. + + ## Attributes + + * `fractions` (*type:* `list(float())`, *default:* `nil`) - Values between 0.0 and 1.0 (inclusive) and NaN. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :fractions => list(float()) | nil + } + + field(:fractions, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.ChromeUXReport.V1.Model.FractionTimeseries do + def decode(value, options) do + GoogleApi.ChromeUXReport.V1.Model.FractionTimeseries.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ChromeUXReport.V1.Model.FractionTimeseries do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/history_key.ex b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/history_key.ex new file mode 100644 index 0000000000..161396a728 --- /dev/null +++ b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/history_key.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.ChromeUXReport.V1.Model.HistoryKey do + @moduledoc """ + Key defines all the dimensions that identify this record as unique. + + ## Attributes + + * `formFactor` (*type:* `String.t`, *default:* `nil`) - The form factor is the device class that all users used to access the site for this record. If the form factor is unspecified, then aggregated data over all form factors will be returned. + * `origin` (*type:* `String.t`, *default:* `nil`) - Origin specifies the origin that this record is for. Note: When specifying an origin, data for loads under this origin over all pages are aggregated into origin level user experience data. + * `url` (*type:* `String.t`, *default:* `nil`) - Url specifies a specific url that this record is for. This url should be normalized, following the normalization actions taken in the request to increase the chances of successful lookup. Note: When specifying a "url" only data for that specific url will be aggregated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :formFactor => String.t() | nil, + :origin => String.t() | nil, + :url => String.t() | nil + } + + field(:formFactor) + field(:origin) + field(:url) +end + +defimpl Poison.Decoder, for: GoogleApi.ChromeUXReport.V1.Model.HistoryKey do + def decode(value, options) do + GoogleApi.ChromeUXReport.V1.Model.HistoryKey.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ChromeUXReport.V1.Model.HistoryKey do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/history_record.ex b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/history_record.ex new file mode 100644 index 0000000000..bc0d2b6808 --- /dev/null +++ b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/history_record.ex @@ -0,0 +1,55 @@ +# 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.ChromeUXReport.V1.Model.HistoryRecord do + @moduledoc """ + HistoryRecord is a timeseries of Chrome UX Report data. It contains user experience statistics for a single url pattern and a set of dimensions. + + ## Attributes + + * `collectionPeriods` (*type:* `list(GoogleApi.ChromeUXReport.V1.Model.CollectionPeriod.t)`, *default:* `nil`) - The collection periods indicate when each of the data points reflected in the time series data in metrics was collected. Note that all the time series share the same collection periods, and it is enforced in the CrUX pipeline that every time series has the same number of data points. + * `key` (*type:* `GoogleApi.ChromeUXReport.V1.Model.HistoryKey.t`, *default:* `nil`) - Key defines all of the unique querying parameters needed to look up a user experience history record. + * `metrics` (*type:* `%{optional(String.t) => GoogleApi.ChromeUXReport.V1.Model.MetricTimeseries.t}`, *default:* `nil`) - Metrics is the map of user experience time series data available for the record defined in the key field. Metrics are keyed on the metric name. Allowed key values: ["first_contentful_paint", "first_input_delay", "largest_contentful_paint", "cumulative_layout_shift", "experimental_time_to_first_byte", "experimental_interaction_to_next_paint"] + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :collectionPeriods => + list(GoogleApi.ChromeUXReport.V1.Model.CollectionPeriod.t()) | nil, + :key => GoogleApi.ChromeUXReport.V1.Model.HistoryKey.t() | nil, + :metrics => + %{optional(String.t()) => GoogleApi.ChromeUXReport.V1.Model.MetricTimeseries.t()} + | nil + } + + field(:collectionPeriods, as: GoogleApi.ChromeUXReport.V1.Model.CollectionPeriod, type: :list) + field(:key, as: GoogleApi.ChromeUXReport.V1.Model.HistoryKey) + field(:metrics, as: GoogleApi.ChromeUXReport.V1.Model.MetricTimeseries, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.ChromeUXReport.V1.Model.HistoryRecord do + def decode(value, options) do + GoogleApi.ChromeUXReport.V1.Model.HistoryRecord.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ChromeUXReport.V1.Model.HistoryRecord do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/metric.ex b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/metric.ex index ca3961193a..0ea5ecbebd 100644 --- a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/metric.ex +++ b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/metric.ex @@ -21,17 +21,20 @@ defmodule GoogleApi.ChromeUXReport.V1.Model.Metric do ## Attributes + * `fractions` (*type:* `map()`, *default:* `nil`) - For enum metrics, provides fractions which add up to approximately 1.0. * `histogram` (*type:* `list(GoogleApi.ChromeUXReport.V1.Model.Bin.t)`, *default:* `nil`) - The histogram of user experiences for a metric. The histogram will have at least one bin and the densities of all bins will add up to ~1. - * `percentiles` (*type:* `GoogleApi.ChromeUXReport.V1.Model.Percentiles.t`, *default:* `nil`) - Common useful percentiles of the Metric. The value type for the percentiles will be the same as the value types given for the Histogram bins. + * `percentiles` (*type:* `GoogleApi.ChromeUXReport.V1.Model.Percentiles.t`, *default:* `nil`) - Commonly useful percentiles of the Metric. The value type for the percentiles will be the same as the value types given for the Histogram bins. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :fractions => map() | nil, :histogram => list(GoogleApi.ChromeUXReport.V1.Model.Bin.t()) | nil, :percentiles => GoogleApi.ChromeUXReport.V1.Model.Percentiles.t() | nil } + field(:fractions, type: :map) field(:histogram, as: GoogleApi.ChromeUXReport.V1.Model.Bin, type: :list) field(:percentiles, as: GoogleApi.ChromeUXReport.V1.Model.Percentiles) end diff --git a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/metric_timeseries.ex b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/metric_timeseries.ex new file mode 100644 index 0000000000..50c28ef80b --- /dev/null +++ b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/metric_timeseries.ex @@ -0,0 +1,55 @@ +# 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.ChromeUXReport.V1.Model.MetricTimeseries do + @moduledoc """ + A `metric timeseries` is a set of user experience data for a single web performance metric, like "first contentful paint". It contains a summary histogram of real world Chrome usage as a series of `bins`, where each bin has density values for a particular time period. + + ## Attributes + + * `fractionTimeseries` (*type:* `%{optional(String.t) => GoogleApi.ChromeUXReport.V1.Model.FractionTimeseries.t}`, *default:* `nil`) - Mapping from labels to timeseries of fractions attributed to this label. + * `histogramTimeseries` (*type:* `list(GoogleApi.ChromeUXReport.V1.Model.TimeseriesBin.t)`, *default:* `nil`) - The histogram of user experiences for a metric. The histogram will have at least one bin and the densities of all bins will add up to ~1, for each timeseries entry. + * `percentilesTimeseries` (*type:* `GoogleApi.ChromeUXReport.V1.Model.TimeseriesPercentiles.t`, *default:* `nil`) - Commonly useful percentiles of the Metric. The value type for the percentiles will be the same as the value types given for the Histogram bins. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :fractionTimeseries => + %{optional(String.t()) => GoogleApi.ChromeUXReport.V1.Model.FractionTimeseries.t()} + | nil, + :histogramTimeseries => list(GoogleApi.ChromeUXReport.V1.Model.TimeseriesBin.t()) | nil, + :percentilesTimeseries => + GoogleApi.ChromeUXReport.V1.Model.TimeseriesPercentiles.t() | nil + } + + field(:fractionTimeseries, as: GoogleApi.ChromeUXReport.V1.Model.FractionTimeseries, type: :map) + field(:histogramTimeseries, as: GoogleApi.ChromeUXReport.V1.Model.TimeseriesBin, type: :list) + field(:percentilesTimeseries, as: GoogleApi.ChromeUXReport.V1.Model.TimeseriesPercentiles) +end + +defimpl Poison.Decoder, for: GoogleApi.ChromeUXReport.V1.Model.MetricTimeseries do + def decode(value, options) do + GoogleApi.ChromeUXReport.V1.Model.MetricTimeseries.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ChromeUXReport.V1.Model.MetricTimeseries do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/query_history_request.ex b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/query_history_request.ex new file mode 100644 index 0000000000..394fc080f6 --- /dev/null +++ b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/query_history_request.ex @@ -0,0 +1,55 @@ +# 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.ChromeUXReport.V1.Model.QueryHistoryRequest do + @moduledoc """ + Request payload sent by a physical web client. This request includes all necessary context to load a particular user experience history record. + + ## Attributes + + * `formFactor` (*type:* `String.t`, *default:* `nil`) - The form factor is a query dimension that specifies the device class that the record's data should belong to. Note: If no form factor is specified, then a special record with aggregated data over all form factors will be returned. + * `metrics` (*type:* `list(String.t)`, *default:* `nil`) - The metrics that should be included in the response. If none are specified then any metrics found will be returned. Allowed values: ["first_contentful_paint", "first_input_delay", "largest_contentful_paint", "cumulative_layout_shift", "experimental_time_to_first_byte", "experimental_interaction_to_next_paint"] + * `origin` (*type:* `String.t`, *default:* `nil`) - The url pattern "origin" refers to a url pattern that is the origin of a website. Examples: "https://example.com", "https://cloud.google.com" + * `url` (*type:* `String.t`, *default:* `nil`) - The url pattern "url" refers to a url pattern that is any arbitrary url. Examples: "https://example.com/", "https://cloud.google.com/why-google-cloud/" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :formFactor => String.t() | nil, + :metrics => list(String.t()) | nil, + :origin => String.t() | nil, + :url => String.t() | nil + } + + field(:formFactor) + field(:metrics, type: :list) + field(:origin) + field(:url) +end + +defimpl Poison.Decoder, for: GoogleApi.ChromeUXReport.V1.Model.QueryHistoryRequest do + def decode(value, options) do + GoogleApi.ChromeUXReport.V1.Model.QueryHistoryRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ChromeUXReport.V1.Model.QueryHistoryRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/query_history_response.ex b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/query_history_response.ex new file mode 100644 index 0000000000..ffb0660169 --- /dev/null +++ b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/query_history_response.ex @@ -0,0 +1,49 @@ +# 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.ChromeUXReport.V1.Model.QueryHistoryResponse do + @moduledoc """ + Response payload sent back to a physical web client. This response contains the record found based on the identiers present in a `QueryHistoryRequest`. The returned response will have a history record, and sometimes details on normalization actions taken on the request that were necessary to make the request successful. + + ## Attributes + + * `record` (*type:* `GoogleApi.ChromeUXReport.V1.Model.HistoryRecord.t`, *default:* `nil`) - The record that was found. + * `urlNormalizationDetails` (*type:* `GoogleApi.ChromeUXReport.V1.Model.UrlNormalization.t`, *default:* `nil`) - These are details about automated normalization actions that were taken in order to make the requested `url_pattern` valid. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :record => GoogleApi.ChromeUXReport.V1.Model.HistoryRecord.t() | nil, + :urlNormalizationDetails => GoogleApi.ChromeUXReport.V1.Model.UrlNormalization.t() | nil + } + + field(:record, as: GoogleApi.ChromeUXReport.V1.Model.HistoryRecord) + field(:urlNormalizationDetails, as: GoogleApi.ChromeUXReport.V1.Model.UrlNormalization) +end + +defimpl Poison.Decoder, for: GoogleApi.ChromeUXReport.V1.Model.QueryHistoryResponse do + def decode(value, options) do + GoogleApi.ChromeUXReport.V1.Model.QueryHistoryResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ChromeUXReport.V1.Model.QueryHistoryResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/record.ex b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/record.ex index e778ad5cdd..72f2664a13 100644 --- a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/record.ex +++ b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/record.ex @@ -23,7 +23,7 @@ defmodule GoogleApi.ChromeUXReport.V1.Model.Record do * `collectionPeriod` (*type:* `GoogleApi.ChromeUXReport.V1.Model.CollectionPeriod.t`, *default:* `nil`) - The collection period indicates when the data reflected in this record was collected. * `key` (*type:* `GoogleApi.ChromeUXReport.V1.Model.Key.t`, *default:* `nil`) - Key defines all of the unique querying parameters needed to look up a user experience record. - * `metrics` (*type:* `%{optional(String.t) => GoogleApi.ChromeUXReport.V1.Model.Metric.t}`, *default:* `nil`) - Metrics is the map of user experience data available for the record defined in the key field. Metrics are keyed on the metric name. Allowed key values: ["first_contentful_paint", "first_input_delay", "largest_contentful_paint", "cumulative_layout_shift"] + * `metrics` (*type:* `%{optional(String.t) => GoogleApi.ChromeUXReport.V1.Model.Metric.t}`, *default:* `nil`) - Metrics is the map of user experience data available for the record defined in the key field. Metrics are keyed on the metric name. Allowed key values: ["first_contentful_paint", "first_input_delay", "largest_contentful_paint", "cumulative_layout_shift", "experimental_time_to_first_byte", "experimental_interaction_to_next_paint"] """ use GoogleApi.Gax.ModelBase diff --git a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/timeseries_bin.ex b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/timeseries_bin.ex new file mode 100644 index 0000000000..98a774016e --- /dev/null +++ b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/timeseries_bin.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.ChromeUXReport.V1.Model.TimeseriesBin do + @moduledoc """ + A bin is a discrete portion of data spanning from start to end, or if no end is given, then from start to +inf. A bin's start and end values are given in the value type of the metric it represents. For example, "first contentful paint" is measured in milliseconds and exposed as ints, therefore its metric bins will use int32s for its start and end types. However, "cumulative layout shift" is measured in unitless decimals and is exposed as a decimal encoded as a string, therefore its metric bins will use strings for its value type. + + ## Attributes + + * `densities` (*type:* `list(float())`, *default:* `nil`) - The proportion of users that experienced this bin's value for the given metric in a given collection period; the index for each of these entries corresponds to an entry in the CollectionPeriods field in the HistoryRecord message, which describes when the density was observed in the field. Thus, the length of this list of densities is equal to the length of the CollectionPeriods field in the HistoryRecord message. + * `end` (*type:* `any()`, *default:* `nil`) - End is the end of the data bin. If end is not populated, then the bin has no end and is valid from start to +inf. + * `start` (*type:* `any()`, *default:* `nil`) - Start is the beginning of the data bin. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :densities => list(float()) | nil, + :end => any() | nil, + :start => any() | nil + } + + field(:densities, type: :list) + field(:end) + field(:start) +end + +defimpl Poison.Decoder, for: GoogleApi.ChromeUXReport.V1.Model.TimeseriesBin do + def decode(value, options) do + GoogleApi.ChromeUXReport.V1.Model.TimeseriesBin.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ChromeUXReport.V1.Model.TimeseriesBin do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/timeseries_percentiles.ex b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/timeseries_percentiles.ex new file mode 100644 index 0000000000..c95515a48a --- /dev/null +++ b/clients/chrome_ux_report/lib/google_api/chrome_ux_report/v1/model/timeseries_percentiles.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.ChromeUXReport.V1.Model.TimeseriesPercentiles do + @moduledoc """ + Percentiles contains synthetic values of a metric at a given statistical percentile. These are used for estimating a metric's value as experienced by a percentage of users out of the total number of users. + + ## Attributes + + * `p75s` (*type:* `list(any())`, *default:* `nil`) - 75% of users experienced the given metric at or below this value. The length of this list of densities is equal to the length of the CollectionPeriods field in the HistoryRecord message, which describes when the density was observed in the field. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :p75s => list(any()) | nil + } + + field(:p75s, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.ChromeUXReport.V1.Model.TimeseriesPercentiles do + def decode(value, options) do + GoogleApi.ChromeUXReport.V1.Model.TimeseriesPercentiles.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ChromeUXReport.V1.Model.TimeseriesPercentiles do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end