From b2e5d2b3b12748920a5af6f0d6e8c1bb0070d890 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 10 Dec 2021 07:42:12 -0800 Subject: [PATCH] Regenerate VersionHistory client (#8872) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2021-12-10 07:39:30,667 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/elixir-google-api/synth.py. On branch autosynth-versionhistory nothing to commit, working tree clean 2021-12-10 07:39:33,475 synthtool [DEBUG] > Running: docker run --rm -v/tmpfs/tmp/tmpignxrdsn/repo:/workspace -v/var/run/docker.sock:/var/run/docker.sock -e USER_GROUP=1000:1000 -w /workspace gcr.io/cloud-devrel-public-resources/elixir19 scripts/generate_client.sh VersionHistory DEBUG:synthtool:Running: docker run --rm -v/tmpfs/tmp/tmpignxrdsn/repo:/workspace -v/var/run/docker.sock:/var/run/docker.sock -e USER_GROUP=1000:1000 -w /workspace gcr.io/cloud-devrel-public-resources/elixir19 scripts/generate_client.sh VersionHistory /workspace /workspace Removing clients/version_history/ The mix.lock file was generated with a newer version of Hex. Update your client by running `mix local.hex` to avoid losing data. Resolving Hex dependencies... Dependency resolution completed: Unchanged: certifi 2.8.0 google_api_discovery 0.7.0 google_gax 0.4.0 hackney 1.18.0 idna 6.1.1 jason 1.2.2 metrics 1.0.1 mime 1.6.0 mimerl 1.2.0 oauth2 0.9.4 parse_trans 3.3.1 poison 3.1.0 ssl_verify_fun 1.1.6 temp 0.4.7 tesla 1.4.3 unicode_util_compat 0.7.0 * Getting google_api_discovery (Hex package) * Getting tesla (Hex package) * Getting oauth2 (Hex package) * Getting temp (Hex package) * Getting jason (Hex package) * Getting poison (Hex package) * Getting hackney (Hex package) * Getting certifi (Hex package) * Getting idna (Hex package) * Getting metrics (Hex package) * Getting mimerl (Hex package) * Getting parse_trans (Hex package) * Getting ssl_verify_fun (Hex package) * Getting unicode_util_compat (Hex package) * Getting mime (Hex package) * Getting google_gax (Hex package) The mix.lock file was generated with a newer version of Hex. Update your client by running `mix local.hex` to avoid losing data. ==> temp Compiling 3 files (.ex) Generated temp app ===> Compiling parse_trans ===> Compiling mimerl ===> Compiling metrics ===> Compiling unicode_util_compat ===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3. ===> Compiling idna ==> jason Compiling 8 files (.ex) Generated jason app warning: String.strip/1 is deprecated. Use String.trim/1 instead /workspace/deps/poison/mix.exs:4 ==> poison Compiling 4 files (.ex) warning: Integer.to_char_list/2 is deprecated. Use Integer.to_charlist/2 instead lib/poison/encoder.ex:173 Generated poison app ==> ssl_verify_fun Compiling 7 files (.erl) Generated ssl_verify_fun app ===> Compiling certifi ===> Rebar3 detected a lock file from a newer version. It will be loaded in compatibility mode, but important information may be missing or lost. It is recommended to upgrade Rebar3. ===> Compiling hackney ==> oauth2 Compiling 13 files (.ex) Generated oauth2 app ==> mime Compiling 2 files (.ex) Generated mime app ==> tesla Compiling 29 files (.ex) Generated tesla app ==> google_gax Compiling 5 files (.ex) Generated google_gax app ==> google_api_discovery Compiling 21 files (.ex) Generated google_api_discovery app ==> google_apis Compiling 28 files (.ex) Generated google_apis app 15:40:06.375 [info] FETCHING: https://versionhistory.googleapis.com/$discovery/GOOGLE_REST_SIMPLE_URI?version=v1 15:40:06.493 [info] FETCHING: https://versionhistory.googleapis.com/$discovery/rest?version=v1 15:40:06.503 [info] FOUND: https://versionhistory.googleapis.com/$discovery/rest?version=v1 Couldn't determine old discovery revision. Generating by default. Creating leading directories Writing Channel to clients/version_history/lib/google_api/version_history/v1/model/channel.ex. Writing Interval to clients/version_history/lib/google_api/version_history/v1/model/interval.ex. Writing ListChannelsResponse to clients/version_history/lib/google_api/version_history/v1/model/list_channels_response.ex. Writing ListPlatformsResponse to clients/version_history/lib/google_api/version_history/v1/model/list_platforms_response.ex. Writing ListReleasesResponse to clients/version_history/lib/google_api/version_history/v1/model/list_releases_response.ex. Writing ListVersionsResponse to clients/version_history/lib/google_api/version_history/v1/model/list_versions_response.ex. Writing Platform to clients/version_history/lib/google_api/version_history/v1/model/platform.ex. Writing Release to clients/version_history/lib/google_api/version_history/v1/model/release.ex. Writing Version to clients/version_history/lib/google_api/version_history/v1/model/version.ex. Writing Platforms to clients/version_history/lib/google_api/version_history/v1/api/platforms.ex. Writing connection.ex. Writing metadata.ex. Writing mix.exs Writing README.md Writing LICENSE Writing .gitignore Writing config/config.exs Writing test/test_helper.exs The mix.lock file was generated with a newer version of Hex. Update your client by running `mix local.hex` to avoid losing data. 15:40:08.151 [warn] Failed to get hex version for google_api_version_history. Falling back on reading mix.exs. 15:40:08.252 [info] Bumping minor fixing file permissions 2021-12-10 07:40:11,976 synthtool [DEBUG] > Wrote metadata to clients/version_history/synth.metadata. DEBUG:synthtool:Wrote metadata to clients/version_history/synth.metadata. ```
Full log will be available here: https://source.cloud.google.com/results/invocations/e1f687b8-a6c8-4d14-b7dc-719f70bb40d9/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) --- clients/version_history/.gitignore | 37 ++ clients/version_history/LICENSE | 201 +++++++++++ clients/version_history/README.md | 23 ++ clients/version_history/config/config.exs | 20 ++ .../version_history/v1/api/platforms.ex | 329 ++++++++++++++++++ .../version_history/v1/connection.ex | 29 ++ .../google_api/version_history/v1/metadata.ex | 26 ++ .../version_history/v1/model/channel.ex | 49 +++ .../version_history/v1/model/interval.ex | 49 +++ .../v1/model/list_channels_response.ex | 49 +++ .../v1/model/list_platforms_response.ex | 49 +++ .../v1/model/list_releases_response.ex | 49 +++ .../v1/model/list_versions_response.ex | 49 +++ .../version_history/v1/model/platform.ex | 49 +++ .../version_history/v1/model/release.ex | 55 +++ .../version_history/v1/model/version.ex | 49 +++ clients/version_history/mix.exs | 66 ++++ clients/version_history/synth.metadata | 11 + clients/version_history/test/test_helper.exs | 35 ++ 19 files changed, 1224 insertions(+) create mode 100644 clients/version_history/.gitignore create mode 100644 clients/version_history/LICENSE create mode 100644 clients/version_history/README.md create mode 100644 clients/version_history/config/config.exs create mode 100644 clients/version_history/lib/google_api/version_history/v1/api/platforms.ex create mode 100644 clients/version_history/lib/google_api/version_history/v1/connection.ex create mode 100644 clients/version_history/lib/google_api/version_history/v1/metadata.ex create mode 100644 clients/version_history/lib/google_api/version_history/v1/model/channel.ex create mode 100644 clients/version_history/lib/google_api/version_history/v1/model/interval.ex create mode 100644 clients/version_history/lib/google_api/version_history/v1/model/list_channels_response.ex create mode 100644 clients/version_history/lib/google_api/version_history/v1/model/list_platforms_response.ex create mode 100644 clients/version_history/lib/google_api/version_history/v1/model/list_releases_response.ex create mode 100644 clients/version_history/lib/google_api/version_history/v1/model/list_versions_response.ex create mode 100644 clients/version_history/lib/google_api/version_history/v1/model/platform.ex create mode 100644 clients/version_history/lib/google_api/version_history/v1/model/release.ex create mode 100644 clients/version_history/lib/google_api/version_history/v1/model/version.ex create mode 100644 clients/version_history/mix.exs create mode 100644 clients/version_history/synth.metadata create mode 100644 clients/version_history/test/test_helper.exs diff --git a/clients/version_history/.gitignore b/clients/version_history/.gitignore new file mode 100644 index 0000000000..6bf4496152 --- /dev/null +++ b/clients/version_history/.gitignore @@ -0,0 +1,37 @@ +# 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. + +# The directory Mix will write compiled artifacts to. +/_build + +# If you run "mix test --cover", coverage assets end up here. +/cover + +# The directory Mix downloads your dependencies sources to. +/deps + +# Where 3rd-party dependencies like ExDoc output generated docs. +/doc + +# Ignore .fetch files in case you like to edit your project deps locally. +/.fetch + +# If the VM crashes, it generates a dump, let's ignore it too. +erl_crash.dump + +# Also ignore archive artifacts (built via "mix archive.build"). +*.ez diff --git a/clients/version_history/LICENSE b/clients/version_history/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/clients/version_history/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/clients/version_history/README.md b/clients/version_history/README.md new file mode 100644 index 0000000000..1a72dc933a --- /dev/null +++ b/clients/version_history/README.md @@ -0,0 +1,23 @@ +# GoogleApi.VersionHistory + +Version History API client library. + +Version History API - Prod + +## Installation + +Install this package from [Hex](https://hex.pm) by adding +`google_api_version_history` to your list of dependencies in `mix.exs`: + +```elixir +def deps do + [{:google_api_version_history, "~> 0.2"}] +end +``` + +## For more information + +Product documentation is available at [https://developers.chrome.com/versionhistory](https://developers.chrome.com/versionhistory). + +Library reference documentation is published on Hexdocs at +[https://hexdocs.pm/google_api_version_history](https://hexdocs.pm/google_api_version_history). diff --git a/clients/version_history/config/config.exs b/clients/version_history/config/config.exs new file mode 100644 index 0000000000..07afe5f311 --- /dev/null +++ b/clients/version_history/config/config.exs @@ -0,0 +1,20 @@ +# 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. + +use Mix.Config + + diff --git a/clients/version_history/lib/google_api/version_history/v1/api/platforms.ex b/clients/version_history/lib/google_api/version_history/v1/api/platforms.ex new file mode 100644 index 0000000000..5d5e8b5e5d --- /dev/null +++ b/clients/version_history/lib/google_api/version_history/v1/api/platforms.ex @@ -0,0 +1,329 @@ +# 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.VersionHistory.V1.Api.Platforms do + @moduledoc """ + API calls for all endpoints tagged `Platforms`. + """ + + alias GoogleApi.VersionHistory.V1.Connection + alias GoogleApi.Gax.{Request, Response} + + @library_version Mix.Project.config() |> Keyword.get(:version, "") + + @doc """ + Returns list of platforms that are available for a given product. The resource "product" has no resource name in its name. + + ## Parameters + + * `connection` (*type:* `GoogleApi.VersionHistory.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The product, which owns this collection of platforms. Format: {product} + * `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. Optional limit on the number of channels to include in the response. If unspecified, the server will pick an appropriate default. + * `:pageToken` (*type:* `String.t`) - Optional. A page token, received from a previous `ListChannels` call. Provide this to retrieve the subsequent page. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.VersionHistory.V1.Model.ListPlatformsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec versionhistory_platforms_list(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.VersionHistory.V1.Model.ListPlatformsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def versionhistory_platforms_list(connection, parent, 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+parent}/platforms", %{ + "parent" => URI.encode(parent, &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.VersionHistory.V1.Model.ListPlatformsResponse{}] + ) + end + + @doc """ + Returns list of channels that are available for a given platform. + + ## Parameters + + * `connection` (*type:* `GoogleApi.VersionHistory.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The platform, which owns this collection of channels. Format: {product}/platforms/{platform} + * `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. Optional limit on the number of channels to include in the response. If unspecified, the server will pick an appropriate default. + * `:pageToken` (*type:* `String.t`) - Optional. A page token, received from a previous `ListChannels` call. Provide this to retrieve the subsequent page. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.VersionHistory.V1.Model.ListChannelsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec versionhistory_platforms_channels_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.VersionHistory.V1.Model.ListChannelsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def versionhistory_platforms_channels_list( + connection, + parent, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+parent}/channels", %{ + "parent" => URI.encode(parent, &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.VersionHistory.V1.Model.ListChannelsResponse{}] + ) + end + + @doc """ + Returns list of version for the given platform/channel. + + ## Parameters + + * `connection` (*type:* `GoogleApi.VersionHistory.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The channel, which owns this collection of versions. Format: {product}/platforms/{platform}/channels/{channel} + * `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"). + * `:filter` (*type:* `String.t`) - Optional. Filter string. Format is a comma separated list of All comma separated filter clauses are conjoined with a logical "and". Valid field_names are "version", "name", "platform", and "channel". Valid operators are "<", "<=", "=", ">=", and ">". Channel comparison is done by distance from stable. Ex) stable < beta, beta < dev, canary < canary_asan. Version comparison is done numerically. If version is not entirely written, the version will be appended with 0 in missing fields. Ex) version > 80 becoms version > 80.0.0.0 Name and platform are filtered by string comparison. Ex) "...?filter=channel<=beta, version >= 80 Ex) "...?filter=version > 80, version < 81 + * `:orderBy` (*type:* `String.t`) - Optional. Ordering string. Valid order_by strings are "version", "name", "platform", and "channel". Optionally, you can append " desc" or " asc" to specify the sorting order. Multiple order_by strings can be used in a comma separated list. Ordering by channel will sort by distance from the stable channel (not alphabetically). A list of channels sorted in this order is: stable, beta, dev, canary, and canary_asan. Sorting by name may cause unexpected behaviour as it is a naive string sort. For example, 1.0.0.8 will be before 1.0.0.10 in descending order. If order_by is not specified the response will be sorted by version in descending order. Ex) "...?order_by=version asc" Ex) "...?order_by=platform desc, channel, version" + * `:pageSize` (*type:* `integer()`) - Optional. Optional limit on the number of versions to include in the response. If unspecified, the server will pick an appropriate default. + * `:pageToken` (*type:* `String.t`) - Optional. A page token, received from a previous `ListVersions` call. Provide this to retrieve the subsequent page. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.VersionHistory.V1.Model.ListVersionsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec versionhistory_platforms_channels_versions_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.VersionHistory.V1.Model.ListVersionsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def versionhistory_platforms_channels_versions_list( + connection, + parent, + 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, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+parent}/versions", %{ + "parent" => URI.encode(parent, &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.VersionHistory.V1.Model.ListVersionsResponse{}] + ) + end + + @doc """ + Returns list of releases of the given version. + + ## Parameters + + * `connection` (*type:* `GoogleApi.VersionHistory.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The version, which owns this collection of releases. Format: {product}/platforms/{platform}/channels/{channel}/versions/{version} + * `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"). + * `:filter` (*type:* `String.t`) - Optional. Filter string. Format is a comma separated list of All comma separated filter clauses are conjoined with a logical "and". Valid field_names are "version", "name", "platform", "channel", "fraction" "starttime", and "endtime". Valid operators are "<", "<=", "=", ">=", and ">". Channel comparison is done by distance from stable. must be a valid channel when filtering by channel. Ex) stable < beta, beta < dev, canary < canary_asan. Version comparison is done numerically. Ex) 1.0.0.8 < 1.0.0.10. If version is not entirely written, the version will be appended with 0 for the missing fields. Ex) version > 80 becoms version > 80.0.0.0 When filtering by starttime or endtime, string must be in RFC 3339 date string format. Name and platform are filtered by string comparison. Ex) "...?filter=channel<=beta, version >= 80 Ex) "...?filter=version > 80, version < 81 Ex) "...?filter=starttime>2020-01-01T00:00:00Z + * `:orderBy` (*type:* `String.t`) - Optional. Ordering string. Valid order_by strings are "version", "name", "starttime", "endtime", "platform", "channel", and "fraction". Optionally, you can append "desc" or "asc" to specify the sorting order. Multiple order_by strings can be used in a comma separated list. Ordering by channel will sort by distance from the stable channel (not alphabetically). A list of channels sorted in this order is: stable, beta, dev, canary, and canary_asan. Sorting by name may cause unexpected behaviour as it is a naive string sort. For example, 1.0.0.8 will be before 1.0.0.10 in descending order. If order_by is not specified the response will be sorted by starttime in descending order. Ex) "...?order_by=starttime asc" Ex) "...?order_by=platform desc, channel, startime desc" + * `:pageSize` (*type:* `integer()`) - Optional. Optional limit on the number of releases to include in the response. If unspecified, the server will pick an appropriate default. + * `:pageToken` (*type:* `String.t`) - Optional. A page token, received from a previous `ListReleases` call. Provide this to retrieve the subsequent page. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.VersionHistory.V1.Model.ListReleasesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec versionhistory_platforms_channels_versions_releases_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.VersionHistory.V1.Model.ListReleasesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def versionhistory_platforms_channels_versions_releases_list( + connection, + parent, + 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, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+parent}/releases", %{ + "parent" => URI.encode(parent, &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.VersionHistory.V1.Model.ListReleasesResponse{}] + ) + end +end diff --git a/clients/version_history/lib/google_api/version_history/v1/connection.ex b/clients/version_history/lib/google_api/version_history/v1/connection.ex new file mode 100644 index 0000000000..37aded6edb --- /dev/null +++ b/clients/version_history/lib/google_api/version_history/v1/connection.ex @@ -0,0 +1,29 @@ +# 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.VersionHistory.V1.Connection do + @moduledoc """ + Handle Tesla connections for GoogleApi.VersionHistory.V1. + """ + + @type t :: Tesla.Env.client() + + use GoogleApi.Gax.Connection, + scopes: [], + otp_app: :google_api_version_history, + base_url: "https://versionhistory.googleapis.com/" +end diff --git a/clients/version_history/lib/google_api/version_history/v1/metadata.ex b/clients/version_history/lib/google_api/version_history/v1/metadata.ex new file mode 100644 index 0000000000..0eef9adf80 --- /dev/null +++ b/clients/version_history/lib/google_api/version_history/v1/metadata.ex @@ -0,0 +1,26 @@ +# Copyright 2020 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.VersionHistory.V1 do + @moduledoc """ + API client metadata for GoogleApi.VersionHistory.V1. + """ + + @discovery_revision "20211206" + + def discovery_revision(), do: @discovery_revision +end diff --git a/clients/version_history/lib/google_api/version_history/v1/model/channel.ex b/clients/version_history/lib/google_api/version_history/v1/model/channel.ex new file mode 100644 index 0000000000..a983229f71 --- /dev/null +++ b/clients/version_history/lib/google_api/version_history/v1/model/channel.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.VersionHistory.V1.Model.Channel do + @moduledoc """ + Each Channel is owned by a Platform and owns a collection of versions. Possible Channels are listed in the Channel enum below. Not all Channels are available for every Platform (e.g. CANARY does not exist for LINUX). + + ## Attributes + + * `channelType` (*type:* `String.t`, *default:* `nil`) - Type of channel. + * `name` (*type:* `String.t`, *default:* `nil`) - Channel name. Format is "{product}/platforms/{platform}/channels/{channel}" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :channelType => String.t() | nil, + :name => String.t() | nil + } + + field(:channelType) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.VersionHistory.V1.Model.Channel do + def decode(value, options) do + GoogleApi.VersionHistory.V1.Model.Channel.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.VersionHistory.V1.Model.Channel do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/version_history/lib/google_api/version_history/v1/model/interval.ex b/clients/version_history/lib/google_api/version_history/v1/model/interval.ex new file mode 100644 index 0000000000..4f4768ae5a --- /dev/null +++ b/clients/version_history/lib/google_api/version_history/v1/model/interval.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.VersionHistory.V1.Model.Interval do + @moduledoc """ + Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. + + ## Attributes + + * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. + * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :endTime => DateTime.t() | nil, + :startTime => DateTime.t() | nil + } + + field(:endTime, as: DateTime) + field(:startTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.VersionHistory.V1.Model.Interval do + def decode(value, options) do + GoogleApi.VersionHistory.V1.Model.Interval.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.VersionHistory.V1.Model.Interval do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/version_history/lib/google_api/version_history/v1/model/list_channels_response.ex b/clients/version_history/lib/google_api/version_history/v1/model/list_channels_response.ex new file mode 100644 index 0000000000..abd5303a91 --- /dev/null +++ b/clients/version_history/lib/google_api/version_history/v1/model/list_channels_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.VersionHistory.V1.Model.ListChannelsResponse do + @moduledoc """ + Response message for ListChannels. + + ## Attributes + + * `channels` (*type:* `list(GoogleApi.VersionHistory.V1.Model.Channel.t)`, *default:* `nil`) - The list of channels. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :channels => list(GoogleApi.VersionHistory.V1.Model.Channel.t()) | nil, + :nextPageToken => String.t() | nil + } + + field(:channels, as: GoogleApi.VersionHistory.V1.Model.Channel, type: :list) + field(:nextPageToken) +end + +defimpl Poison.Decoder, for: GoogleApi.VersionHistory.V1.Model.ListChannelsResponse do + def decode(value, options) do + GoogleApi.VersionHistory.V1.Model.ListChannelsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.VersionHistory.V1.Model.ListChannelsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/version_history/lib/google_api/version_history/v1/model/list_platforms_response.ex b/clients/version_history/lib/google_api/version_history/v1/model/list_platforms_response.ex new file mode 100644 index 0000000000..fa3a9027eb --- /dev/null +++ b/clients/version_history/lib/google_api/version_history/v1/model/list_platforms_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.VersionHistory.V1.Model.ListPlatformsResponse do + @moduledoc """ + Response message for ListPlatforms. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + * `platforms` (*type:* `list(GoogleApi.VersionHistory.V1.Model.Platform.t)`, *default:* `nil`) - The list of platforms. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :platforms => list(GoogleApi.VersionHistory.V1.Model.Platform.t()) | nil + } + + field(:nextPageToken) + field(:platforms, as: GoogleApi.VersionHistory.V1.Model.Platform, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.VersionHistory.V1.Model.ListPlatformsResponse do + def decode(value, options) do + GoogleApi.VersionHistory.V1.Model.ListPlatformsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.VersionHistory.V1.Model.ListPlatformsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/version_history/lib/google_api/version_history/v1/model/list_releases_response.ex b/clients/version_history/lib/google_api/version_history/v1/model/list_releases_response.ex new file mode 100644 index 0000000000..e4f777bce9 --- /dev/null +++ b/clients/version_history/lib/google_api/version_history/v1/model/list_releases_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.VersionHistory.V1.Model.ListReleasesResponse do + @moduledoc """ + Response message for ListReleases. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + * `releases` (*type:* `list(GoogleApi.VersionHistory.V1.Model.Release.t)`, *default:* `nil`) - The list of releases. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :releases => list(GoogleApi.VersionHistory.V1.Model.Release.t()) | nil + } + + field(:nextPageToken) + field(:releases, as: GoogleApi.VersionHistory.V1.Model.Release, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.VersionHistory.V1.Model.ListReleasesResponse do + def decode(value, options) do + GoogleApi.VersionHistory.V1.Model.ListReleasesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.VersionHistory.V1.Model.ListReleasesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/version_history/lib/google_api/version_history/v1/model/list_versions_response.ex b/clients/version_history/lib/google_api/version_history/v1/model/list_versions_response.ex new file mode 100644 index 0000000000..35614c73a4 --- /dev/null +++ b/clients/version_history/lib/google_api/version_history/v1/model/list_versions_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.VersionHistory.V1.Model.ListVersionsResponse do + @moduledoc """ + Response message for ListVersions. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + * `versions` (*type:* `list(GoogleApi.VersionHistory.V1.Model.Version.t)`, *default:* `nil`) - The list of versions. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :versions => list(GoogleApi.VersionHistory.V1.Model.Version.t()) | nil + } + + field(:nextPageToken) + field(:versions, as: GoogleApi.VersionHistory.V1.Model.Version, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.VersionHistory.V1.Model.ListVersionsResponse do + def decode(value, options) do + GoogleApi.VersionHistory.V1.Model.ListVersionsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.VersionHistory.V1.Model.ListVersionsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/version_history/lib/google_api/version_history/v1/model/platform.ex b/clients/version_history/lib/google_api/version_history/v1/model/platform.ex new file mode 100644 index 0000000000..8f438f6d27 --- /dev/null +++ b/clients/version_history/lib/google_api/version_history/v1/model/platform.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.VersionHistory.V1.Model.Platform do + @moduledoc """ + Each Platform is owned by a Product and owns a collection of channels. Available platforms are listed in Platform enum below. Not all Channels are available for every Platform (e.g. CANARY does not exist for LINUX). + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Platform name. Format is "{product}/platforms/{platform}" + * `platformType` (*type:* `String.t`, *default:* `nil`) - Type of platform. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil, + :platformType => String.t() | nil + } + + field(:name) + field(:platformType) +end + +defimpl Poison.Decoder, for: GoogleApi.VersionHistory.V1.Model.Platform do + def decode(value, options) do + GoogleApi.VersionHistory.V1.Model.Platform.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.VersionHistory.V1.Model.Platform do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/version_history/lib/google_api/version_history/v1/model/release.ex b/clients/version_history/lib/google_api/version_history/v1/model/release.ex new file mode 100644 index 0000000000..bdecaaeacd --- /dev/null +++ b/clients/version_history/lib/google_api/version_history/v1/model/release.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.VersionHistory.V1.Model.Release do + @moduledoc """ + A Release is owned by a Version. A Release contains information about the release(s) of its parent version. This includes when the release began and ended, as well as what percentage it was released at. If the version is released again, or if the serving percentage changes, it will create another release under the version. + + ## Attributes + + * `fraction` (*type:* `float()`, *default:* `nil`) - Rollout fraction. This fraction indicates the fraction of people that should receive this version in this release. If the fraction is not specified in ReleaseManager, the API will assume fraction is 1. + * `name` (*type:* `String.t`, *default:* `nil`) - Release name. Format is "{product}/platforms/{platform}/channels/{channel}/versions/{version}/releases/{release}" + * `serving` (*type:* `GoogleApi.VersionHistory.V1.Model.Interval.t`, *default:* `nil`) - Timestamp interval of when the release was live. If end_time is unspecified, the release is currently live. + * `version` (*type:* `String.t`, *default:* `nil`) - String containing just the version number. e.g. "84.0.4147.38" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :fraction => float() | nil, + :name => String.t() | nil, + :serving => GoogleApi.VersionHistory.V1.Model.Interval.t() | nil, + :version => String.t() | nil + } + + field(:fraction) + field(:name) + field(:serving, as: GoogleApi.VersionHistory.V1.Model.Interval) + field(:version) +end + +defimpl Poison.Decoder, for: GoogleApi.VersionHistory.V1.Model.Release do + def decode(value, options) do + GoogleApi.VersionHistory.V1.Model.Release.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.VersionHistory.V1.Model.Release do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/version_history/lib/google_api/version_history/v1/model/version.ex b/clients/version_history/lib/google_api/version_history/v1/model/version.ex new file mode 100644 index 0000000000..d3786850eb --- /dev/null +++ b/clients/version_history/lib/google_api/version_history/v1/model/version.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.VersionHistory.V1.Model.Version do + @moduledoc """ + Each Version is owned by a Channel. A Version only displays the Version number (e.g. 84.0.4147.38). A Version owns a collection of releases. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Version name. Format is "{product}/platforms/{platform}/channels/{channel}/versions/{version}" e.g. "chrome/platforms/win/channels/beta/versions/84.0.4147.38" + * `version` (*type:* `String.t`, *default:* `nil`) - String containing just the version number. e.g. "84.0.4147.38" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil, + :version => String.t() | nil + } + + field(:name) + field(:version) +end + +defimpl Poison.Decoder, for: GoogleApi.VersionHistory.V1.Model.Version do + def decode(value, options) do + GoogleApi.VersionHistory.V1.Model.Version.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.VersionHistory.V1.Model.Version do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/version_history/mix.exs b/clients/version_history/mix.exs new file mode 100644 index 0000000000..98ea1de36e --- /dev/null +++ b/clients/version_history/mix.exs @@ -0,0 +1,66 @@ +# 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.VersionHistory.Mixfile do + use Mix.Project + + @version "0.2.0" + + def project() do + [ + app: :google_api_version_history, + version: @version, + elixir: "~> 1.6", + build_embedded: Mix.env == :prod, + start_permanent: Mix.env == :prod, + description: description(), + package: package(), + deps: deps(), + source_url: "https://github.com/googleapis/elixir-google-api/tree/master/clients/version_history" + ] + end + + def application() do + [extra_applications: [:logger]] + end + + defp deps() do + [ + {:google_gax, "~> 0.4"}, + + {:ex_doc, "~> 0.16", only: :dev} + ] + end + + defp description() do + """ + Version History API client library. Version History API - Prod + """ + end + + defp package() do + [ + files: ["lib", "mix.exs", "README*", "LICENSE"], + maintainers: ["Jeff Ching", "Daniel Azuma"], + licenses: ["Apache 2.0"], + links: %{ + "GitHub" => "https://github.com/googleapis/elixir-google-api/tree/master/clients/version_history", + "Homepage" => "https://developers.chrome.com/versionhistory" + } + ] + end +end diff --git a/clients/version_history/synth.metadata b/clients/version_history/synth.metadata new file mode 100644 index 0000000000..2500e4d4ef --- /dev/null +++ b/clients/version_history/synth.metadata @@ -0,0 +1,11 @@ +{ + "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/elixir-google-api.git", + "sha": "706d99393d8cd552e5999ab61cc5b763765872b4" + } + } + ] +} \ No newline at end of file diff --git a/clients/version_history/test/test_helper.exs b/clients/version_history/test/test_helper.exs new file mode 100644 index 0000000000..a1fc1806fc --- /dev/null +++ b/clients/version_history/test/test_helper.exs @@ -0,0 +1,35 @@ +# 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. + +ExUnit.start() + +defmodule GoogleApi.VersionHistory.TestHelper do + + defmacro __using__(opts) do + quote do + use ExUnit.Case, unquote(opts) + import GoogleApi.VersionHistory.TestHelper + end + end + + def for_scope(scopes) when is_list(scopes), do: for_scope(Enum.join(scopes, " ")) + def for_scope(scope) do + {:ok, token} = Goth.Token.for_scope(scope) + token.token + end + +end