Current section

16 Versions

Jump to

Compare versions

8 files changed
+240 additions
-14 deletions
  @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
11 11
12 12 ```elixir
13 13 def deps do
14 - [{:google_api_digital_asset_links, "~> 0.10"}]
14 + [{:google_api_digital_asset_links, "~> 0.11"}]
15 15 end
16 16 ```
  @@ -6,19 +6,22 @@
6 6 {<<"files">>,
7 7 [<<"lib">>,<<"lib/google_api">>,<<"lib/google_api/digital_asset_links">>,
8 8 <<"lib/google_api/digital_asset_links/v1">>,
9 - <<"lib/google_api/digital_asset_links/v1/metadata.ex">>,
9 + <<"lib/google_api/digital_asset_links/v1/connection.ex">>,
10 + <<"lib/google_api/digital_asset_links/v1/model">>,
11 + <<"lib/google_api/digital_asset_links/v1/model/check_response.ex">>,
12 + <<"lib/google_api/digital_asset_links/v1/model/statement_template.ex">>,
13 + <<"lib/google_api/digital_asset_links/v1/model/certificate_info.ex">>,
14 + <<"lib/google_api/digital_asset_links/v1/model/bulk_check_response.ex">>,
15 + <<"lib/google_api/digital_asset_links/v1/model/asset.ex">>,
16 + <<"lib/google_api/digital_asset_links/v1/model/bulk_check_request.ex">>,
17 + <<"lib/google_api/digital_asset_links/v1/model/statement.ex">>,
18 + <<"lib/google_api/digital_asset_links/v1/model/web_asset.ex">>,
19 + <<"lib/google_api/digital_asset_links/v1/model/android_app_asset.ex">>,
20 + <<"lib/google_api/digital_asset_links/v1/model/list_response.ex">>,
10 21 <<"lib/google_api/digital_asset_links/v1/api">>,
11 22 <<"lib/google_api/digital_asset_links/v1/api/assetlinks.ex">>,
12 23 <<"lib/google_api/digital_asset_links/v1/api/statements.ex">>,
13 - <<"lib/google_api/digital_asset_links/v1/model">>,
14 - <<"lib/google_api/digital_asset_links/v1/model/web_asset.ex">>,
15 - <<"lib/google_api/digital_asset_links/v1/model/statement.ex">>,
16 - <<"lib/google_api/digital_asset_links/v1/model/asset.ex">>,
17 - <<"lib/google_api/digital_asset_links/v1/model/check_response.ex">>,
18 - <<"lib/google_api/digital_asset_links/v1/model/list_response.ex">>,
19 - <<"lib/google_api/digital_asset_links/v1/model/certificate_info.ex">>,
20 - <<"lib/google_api/digital_asset_links/v1/model/android_app_asset.ex">>,
21 - <<"lib/google_api/digital_asset_links/v1/connection.ex">>,<<"mix.exs">>,
24 + <<"lib/google_api/digital_asset_links/v1/metadata.ex">>,<<"mix.exs">>,
22 25 <<"README.md">>,<<"LICENSE">>]}.
23 26 {<<"licenses">>,[<<"Apache 2.0">>]}.
24 27 {<<"links">>,
  @@ -32,4 +35,4 @@
32 35 {<<"optional">>,false},
33 36 {<<"repository">>,<<"hexpm">>},
34 37 {<<"requirement">>,<<"~> 0.4">>}]]}.
35 - {<<"version">>,<<"0.10.0">>}.
38 + {<<"version">>,<<"0.11.0">>}.
  @@ -25,6 +25,67 @@ defmodule GoogleApi.DigitalAssetLinks.V1.Api.Assetlinks do
25 25
26 26 @library_version Mix.Project.config() |> Keyword.get(:version, "")
27 27
28 + @doc """
29 + Send a bundle of statement checks in a single RPC to minimize latency and service load. Statements need not be all for the same source and/or target. We recommend using this method when you need to check more than one statement in a short period of time.
30 +
31 + ## Parameters
32 +
33 + * `connection` (*type:* `GoogleApi.DigitalAssetLinks.V1.Connection.t`) - Connection to server
34 + * `optional_params` (*type:* `keyword()`) - Optional parameters
35 + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
36 + * `:access_token` (*type:* `String.t`) - OAuth access token.
37 + * `:alt` (*type:* `String.t`) - Data format for response.
38 + * `:callback` (*type:* `String.t`) - JSONP
39 + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
40 + * `: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.
41 + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
42 + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
43 + * `: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.
44 + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
45 + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
46 + * `:body` (*type:* `GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckRequest.t`) -
47 + * `opts` (*type:* `keyword()`) - Call options
48 +
49 + ## Returns
50 +
51 + * `{:ok, %GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckResponse{}}` on success
52 + * `{:error, info}` on failure
53 + """
54 + @spec digitalassetlinks_assetlinks_bulk_check(Tesla.Env.client(), keyword(), keyword()) ::
55 + {:ok, GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckResponse.t()}
56 + | {:ok, Tesla.Env.t()}
57 + | {:ok, list()}
58 + | {:error, any()}
59 + def digitalassetlinks_assetlinks_bulk_check(connection, optional_params \\ [], opts \\ []) do
60 + optional_params_config = %{
61 + :"$.xgafv" => :query,
62 + :access_token => :query,
63 + :alt => :query,
64 + :callback => :query,
65 + :fields => :query,
66 + :key => :query,
67 + :oauth_token => :query,
68 + :prettyPrint => :query,
69 + :quotaUser => :query,
70 + :uploadType => :query,
71 + :upload_protocol => :query,
72 + :body => :body
73 + }
74 +
75 + request =
76 + Request.new()
77 + |> Request.method(:post)
78 + |> Request.url("/v1/assetlinks:bulkCheck", %{})
79 + |> Request.add_optional_params(optional_params_config, optional_params)
80 + |> Request.library_version(@library_version)
81 +
82 + connection
83 + |> Connection.execute(request)
84 + |> Response.decode(
85 + opts ++ [struct: %GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckResponse{}]
86 + )
87 + end
88 +
28 89 @doc """
29 90 Determines whether the specified (directional) relationship exists between the specified source and target assets. The relation describes the intent of the link between the two assets as claimed by the source asset. An example for such relationships is the delegation of privileges or permissions. This command is most often used by infrastructure systems to check preconditions for an action. For example, a client may want to know if it is OK to send a web URL to a particular mobile app instead. The client can check for the relevant asset link from the website to the mobile app to decide if the operation should be allowed. A note about security: if you specify a secure asset as the source, such as an HTTPS website or an Android app, the API will ensure that any statements used to generate the response have been made in a secure way by the owner of that asset. Conversely, if the source asset is an insecure HTTP website (that is, the URL starts with `http://` instead of `https://`), the API cannot verify its statements securely, and it is not possible to ensure that the website's statements have not been altered by a third party. For more information, see the [Digital Asset Links technical design specification](https://github.com/google/digitalassetlinks/blob/master/well-known/details.md).
  @@ -20,7 +20,7 @@ defmodule GoogleApi.DigitalAssetLinks.V1 do
20 20 API client metadata for GoogleApi.DigitalAssetLinks.V1.
21 21 """
22 22
23 - @discovery_revision "20210301"
23 + @discovery_revision "20220122"
24 24
25 25 def discovery_revision(), do: @discovery_revision
26 26 end
  @@ -0,0 +1,61 @@
1 + # Copyright 2019 Google LLC
2 + #
3 + # Licensed under the Apache License, Version 2.0 (the "License");
4 + # you may not use this file except in compliance with the License.
5 + # You may obtain a copy of the License at
6 + #
7 + # http://www.apache.org/licenses/LICENSE-2.0
8 + #
9 + # Unless required by applicable law or agreed to in writing, software
10 + # distributed under the License is distributed on an "AS IS" BASIS,
11 + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 + # See the License for the specific language governing permissions and
13 + # limitations under the License.
14 +
15 + # NOTE: This file is auto generated by the elixir code generator program.
16 + # Do not edit this file manually.
17 +
18 + defmodule GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckRequest do
19 + @moduledoc """
20 + Message used to check for the existence of multiple digital asset links within a single RPC.
21 +
22 + ## Attributes
23 +
24 + * `allowGoogleInternalDataSources` (*type:* `boolean()`, *default:* `nil`) - Same configuration as in Check request, all statements checks will use same configurations.
25 + * `defaultRelation` (*type:* `String.t`, *default:* `nil`) - If specified, will be used in any given template statement that doesn’t specify a relation.
26 + * `defaultSource` (*type:* `GoogleApi.DigitalAssetLinks.V1.Model.Asset.t`, *default:* `nil`) - If specified, will be used in any given template statement that doesn’t specify a source.
27 + * `defaultTarget` (*type:* `GoogleApi.DigitalAssetLinks.V1.Model.Asset.t`, *default:* `nil`) - If specified, will be used in any given template statement that doesn’t specify a target.
28 + * `skipCacheLookup` (*type:* `boolean()`, *default:* `nil`) - Same configuration as in Check request, all statements checks will use same configurations.
29 + * `statements` (*type:* `list(GoogleApi.DigitalAssetLinks.V1.Model.StatementTemplate.t)`, *default:* `nil`) - List of statements to check. For each statement, you can omit a field if the corresponding default_* field below was supplied. Minimum 1 statement; maximum 1,000 statements. Any additional statements will be ignored.
30 + """
31 +
32 + use GoogleApi.Gax.ModelBase
33 +
34 + @type t :: %__MODULE__{
35 + :allowGoogleInternalDataSources => boolean() | nil,
36 + :defaultRelation => String.t() | nil,
37 + :defaultSource => GoogleApi.DigitalAssetLinks.V1.Model.Asset.t() | nil,
38 + :defaultTarget => GoogleApi.DigitalAssetLinks.V1.Model.Asset.t() | nil,
39 + :skipCacheLookup => boolean() | nil,
40 + :statements => list(GoogleApi.DigitalAssetLinks.V1.Model.StatementTemplate.t()) | nil
41 + }
42 +
43 + field(:allowGoogleInternalDataSources)
44 + field(:defaultRelation)
45 + field(:defaultSource, as: GoogleApi.DigitalAssetLinks.V1.Model.Asset)
46 + field(:defaultTarget, as: GoogleApi.DigitalAssetLinks.V1.Model.Asset)
47 + field(:skipCacheLookup)
48 + field(:statements, as: GoogleApi.DigitalAssetLinks.V1.Model.StatementTemplate, type: :list)
49 + end
50 +
51 + defimpl Poison.Decoder, for: GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckRequest do
52 + def decode(value, options) do
53 + GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckRequest.decode(value, options)
54 + end
55 + end
56 +
57 + defimpl Poison.Encoder, for: GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckRequest do
58 + def encode(value, options) do
59 + GoogleApi.Gax.ModelBase.encode(value, options)
60 + end
61 + end
Loading more files…