From 4a1e2c2f80dd5b3ce9c1737575eb0957e71cd03e Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Mon, 11 Mar 2024 18:54:16 -0700 Subject: [PATCH] feat: Automated regeneration of WebFonts client (#10892) Auto-created at 2024-03-12 01:33:57 +0000 using the toys pull request generator. --- clients/web_fonts/README.md | 2 +- .../google_api/web_fonts/v1/api/webfonts.ex | 8 ++- .../lib/google_api/web_fonts/v1/metadata.ex | 2 +- .../lib/google_api/web_fonts/v1/model/axis.ex | 52 +++++++++++++++++++ .../google_api/web_fonts/v1/model/webfont.ex | 6 +++ clients/web_fonts/mix.exs | 2 +- 6 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 clients/web_fonts/lib/google_api/web_fonts/v1/model/axis.ex diff --git a/clients/web_fonts/README.md b/clients/web_fonts/README.md index c1dcf12d62..d61c7a1b56 100644 --- a/clients/web_fonts/README.md +++ b/clients/web_fonts/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_web_fonts, "~> 0.3"}] + [{:google_api_web_fonts, "~> 0.4"}] end ``` diff --git a/clients/web_fonts/lib/google_api/web_fonts/v1/api/webfonts.ex b/clients/web_fonts/lib/google_api/web_fonts/v1/api/webfonts.ex index 9ef330d739..9a6b7ef56c 100644 --- a/clients/web_fonts/lib/google_api/web_fonts/v1/api/webfonts.ex +++ b/clients/web_fonts/lib/google_api/web_fonts/v1/api/webfonts.ex @@ -43,7 +43,10 @@ defmodule GoogleApi.WebFonts.V1.Api.Webfonts 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"). + * `:capability` (*type:* `list(String.t)`) - Controls the font urls in `Webfont.files`, by default, static ttf fonts are sent. + * `:family` (*type:* `list(String.t)`) - Filters by Webfont.family, using literal match. If not set, returns all families * `:sort` (*type:* `String.t`) - Enables sorting of the list. + * `:subset` (*type:* `String.t`) - Filters by Webfont.subset, if subset is found in Webfont.subsets. If not set, returns all families. * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -69,7 +72,10 @@ defmodule GoogleApi.WebFonts.V1.Api.Webfonts do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :sort => :query + :capability => :query, + :family => :query, + :sort => :query, + :subset => :query } request = diff --git a/clients/web_fonts/lib/google_api/web_fonts/v1/metadata.ex b/clients/web_fonts/lib/google_api/web_fonts/v1/metadata.ex index 0fc79aae08..49a86b01ea 100644 --- a/clients/web_fonts/lib/google_api/web_fonts/v1/metadata.ex +++ b/clients/web_fonts/lib/google_api/web_fonts/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.WebFonts.V1 do API client metadata for GoogleApi.WebFonts.V1. """ - @discovery_revision "20210213" + @discovery_revision "20240306" def discovery_revision(), do: @discovery_revision end diff --git a/clients/web_fonts/lib/google_api/web_fonts/v1/model/axis.ex b/clients/web_fonts/lib/google_api/web_fonts/v1/model/axis.ex new file mode 100644 index 0000000000..afbb222148 --- /dev/null +++ b/clients/web_fonts/lib/google_api/web_fonts/v1/model/axis.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.WebFonts.V1.Model.Axis do + @moduledoc """ + Metadata for a variable font axis. + + ## Attributes + + * `end` (*type:* `number()`, *default:* `nil`) - maximum value + * `start` (*type:* `number()`, *default:* `nil`) - minimum value + * `tag` (*type:* `String.t`, *default:* `nil`) - tag name. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :end => number() | nil, + :start => number() | nil, + :tag => String.t() | nil + } + + field(:end) + field(:start) + field(:tag) +end + +defimpl Poison.Decoder, for: GoogleApi.WebFonts.V1.Model.Axis do + def decode(value, options) do + GoogleApi.WebFonts.V1.Model.Axis.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.WebFonts.V1.Model.Axis do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/web_fonts/lib/google_api/web_fonts/v1/model/webfont.ex b/clients/web_fonts/lib/google_api/web_fonts/v1/model/webfont.ex index 269e9b8749..3af00dd5eb 100644 --- a/clients/web_fonts/lib/google_api/web_fonts/v1/model/webfont.ex +++ b/clients/web_fonts/lib/google_api/web_fonts/v1/model/webfont.ex @@ -21,11 +21,13 @@ defmodule GoogleApi.WebFonts.V1.Model.Webfont do ## Attributes + * `axes` (*type:* `list(GoogleApi.WebFonts.V1.Model.Axis.t)`, *default:* `nil`) - Axis for variable fonts. * `category` (*type:* `String.t`, *default:* `nil`) - The category of the font. * `family` (*type:* `String.t`, *default:* `nil`) - The name of the font. * `files` (*type:* `map()`, *default:* `nil`) - The font files (with all supported scripts) for each one of the available variants, as a key : value map. * `kind` (*type:* `String.t`, *default:* `nil`) - This kind represents a webfont object in the webfonts service. * `lastModified` (*type:* `String.t`, *default:* `nil`) - The date (format "yyyy-MM-dd") the font was modified for the last time. + * `menu` (*type:* `String.t`, *default:* `nil`) - Font URL for menu subset, a subset of the font that is enough to display the font name * `subsets` (*type:* `list(String.t)`, *default:* `nil`) - The scripts supported by the font. * `variants` (*type:* `list(String.t)`, *default:* `nil`) - The available variants for the font. * `version` (*type:* `String.t`, *default:* `nil`) - The font version. @@ -34,21 +36,25 @@ defmodule GoogleApi.WebFonts.V1.Model.Webfont do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :axes => list(GoogleApi.WebFonts.V1.Model.Axis.t()) | nil, :category => String.t() | nil, :family => String.t() | nil, :files => map() | nil, :kind => String.t() | nil, :lastModified => String.t() | nil, + :menu => String.t() | nil, :subsets => list(String.t()) | nil, :variants => list(String.t()) | nil, :version => String.t() | nil } + field(:axes, as: GoogleApi.WebFonts.V1.Model.Axis, type: :list) field(:category) field(:family) field(:files, type: :map) field(:kind) field(:lastModified) + field(:menu) field(:subsets, type: :list) field(:variants, type: :list) field(:version) diff --git a/clients/web_fonts/mix.exs b/clients/web_fonts/mix.exs index 43e1635fa3..1db9193b3a 100644 --- a/clients/web_fonts/mix.exs +++ b/clients/web_fonts/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.WebFonts.Mixfile do use Mix.Project - @version "0.3.0" + @version "0.4.0" def project() do [