google-api-client 0.18.0 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +41 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +9 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +1 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +1 -1
- data/generated/google/apis/admin_directory_v1.rb +1 -1
- data/generated/google/apis/admin_directory_v1/classes.rb +238 -10
- data/generated/google/apis/admin_directory_v1/representations.rb +101 -0
- data/generated/google/apis/admin_directory_v1/service.rb +529 -1
- data/generated/google/apis/androidmanagement_v1.rb +1 -1
- data/generated/google/apis/androidmanagement_v1/classes.rb +7 -0
- data/generated/google/apis/androidmanagement_v1/representations.rb +1 -0
- data/generated/google/apis/androidpublisher_v1_1.rb +1 -1
- data/generated/google/apis/androidpublisher_v1_1/classes.rb +9 -0
- data/generated/google/apis/androidpublisher_v1_1/representations.rb +1 -0
- data/generated/google/apis/androidpublisher_v2.rb +1 -1
- data/generated/google/apis/androidpublisher_v2/classes.rb +34 -0
- data/generated/google/apis/androidpublisher_v2/representations.rb +3 -0
- data/generated/google/apis/appengine_v1.rb +1 -1
- data/generated/google/apis/appengine_v1/classes.rb +21 -17
- data/generated/google/apis/appengine_v1beta.rb +1 -1
- data/generated/google/apis/appengine_v1beta/classes.rb +21 -17
- data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
- data/generated/google/apis/bigquerydatatransfer_v1/classes.rb +2 -2
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/calendar_v3/classes.rb +326 -0
- data/generated/google/apis/calendar_v3/representations.rb +118 -0
- data/generated/google/apis/calendar_v3/service.rb +28 -4
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/classroom_v1/classes.rb +69 -0
- data/generated/google/apis/classroom_v1/representations.rb +31 -0
- data/generated/google/apis/classroom_v1/service.rb +88 -0
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +49 -0
- data/generated/google/apis/cloudbuild_v1/representations.rb +20 -0
- data/generated/google/apis/cloudfunctions_v1.rb +1 -1
- data/generated/google/apis/cloudfunctions_v1/classes.rb +9 -12
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +25 -0
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +4 -0
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +8 -3
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +7 -3
- data/generated/google/apis/cloudresourcemanager_v2beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb +8 -6
- data/generated/google/apis/cloudresourcemanager_v2beta1/service.rb +19 -13
- data/generated/google/apis/cloudshell_v1.rb +35 -0
- data/generated/google/apis/cloudshell_v1/classes.rb +409 -0
- data/generated/google/apis/cloudshell_v1/representations.rb +161 -0
- data/generated/google/apis/cloudshell_v1/service.rb +214 -0
- data/generated/google/apis/cloudshell_v1alpha1.rb +35 -0
- data/generated/google/apis/cloudshell_v1alpha1/classes.rb +403 -0
- data/generated/google/apis/cloudshell_v1alpha1/representations.rb +160 -0
- data/generated/google/apis/cloudshell_v1alpha1/service.rb +237 -0
- data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
- data/generated/google/apis/cloudtasks_v2beta2/classes.rb +106 -13
- data/generated/google/apis/cloudtasks_v2beta2/representations.rb +31 -1
- data/generated/google/apis/cloudtasks_v2beta2/service.rb +63 -8
- data/generated/google/apis/cloudtrace_v2.rb +1 -1
- data/generated/google/apis/cloudtrace_v2/service.rb +2 -2
- data/generated/google/apis/container_v1.rb +2 -2
- data/generated/google/apis/container_v1/classes.rb +6 -7
- data/generated/google/apis/container_v1/service.rb +2 -2
- data/generated/google/apis/container_v1beta1.rb +2 -2
- data/generated/google/apis/container_v1beta1/classes.rb +4 -4
- data/generated/google/apis/container_v1beta1/service.rb +3 -3
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/classes.rb +257 -0
- data/generated/google/apis/content_v2/representations.rb +114 -0
- data/generated/google/apis/content_v2/service.rb +84 -0
- data/generated/google/apis/content_v2sandbox.rb +1 -1
- data/generated/google/apis/content_v2sandbox/classes.rb +257 -0
- data/generated/google/apis/content_v2sandbox/representations.rb +114 -0
- data/generated/google/apis/content_v2sandbox/service.rb +84 -0
- data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
- data/generated/google/apis/dialogflow_v2beta1/classes.rb +16 -0
- data/generated/google/apis/digitalassetlinks_v1.rb +32 -0
- data/generated/google/apis/digitalassetlinks_v1/classes.rb +305 -0
- data/generated/google/apis/digitalassetlinks_v1/representations.rb +133 -0
- data/generated/google/apis/digitalassetlinks_v1/service.rb +324 -0
- data/generated/google/apis/dlp_v2beta2.rb +36 -0
- data/generated/google/apis/dlp_v2beta2/classes.rb +5475 -0
- data/generated/google/apis/dlp_v2beta2/representations.rb +2734 -0
- data/generated/google/apis/dlp_v2beta2/service.rb +1135 -0
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/service.rb +25 -16
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/service.rb +1 -1
- data/generated/google/apis/monitoring_v3.rb +1 -1
- data/generated/google/apis/monitoring_v3/classes.rb +50 -1
- data/generated/google/apis/monitoring_v3/representations.rb +16 -0
- data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
- data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +6 -5
- data/generated/google/apis/slides_v1.rb +4 -1
- data/generated/google/apis/speech_v1.rb +1 -4
- data/generated/google/apis/speech_v1beta1.rb +1 -4
- data/generated/google/apis/streetviewpublish_v1.rb +1 -1
- data/generated/google/apis/streetviewpublish_v1/classes.rb +0 -2
- data/generated/google/apis/streetviewpublish_v1/service.rb +6 -0
- data/generated/google/apis/testing_v1.rb +1 -1
- data/generated/google/apis/testing_v1/classes.rb +81 -0
- data/generated/google/apis/testing_v1/representations.rb +45 -0
- data/generated/google/apis/toolresults_v1beta3.rb +1 -1
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +0 -6
- data/generated/google/apis/youtube_v3/representations.rb +0 -1
- data/generated/google/apis/youtubereporting_v1.rb +1 -1
- data/generated/google/apis/youtubereporting_v1/classes.rb +576 -19
- data/generated/google/apis/youtubereporting_v1/representations.rb +218 -12
- data/generated/google/apis/youtubereporting_v1/service.rb +4 -4
- data/lib/google/apis/version.rb +1 -1
- metadata +18 -2
@@ -0,0 +1,133 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
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
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module DigitalassetlinksV1
|
24
|
+
|
25
|
+
class AndroidAppAsset
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class Asset
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class CertificateInfo
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class CheckResponse
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class ListResponse
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class Statement
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class WebAsset
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class AndroidAppAsset
|
68
|
+
# @private
|
69
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
70
|
+
property :certificate, as: 'certificate', class: Google::Apis::DigitalassetlinksV1::CertificateInfo, decorator: Google::Apis::DigitalassetlinksV1::CertificateInfo::Representation
|
71
|
+
|
72
|
+
property :package_name, as: 'packageName'
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
class Asset
|
77
|
+
# @private
|
78
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
79
|
+
property :android_app, as: 'androidApp', class: Google::Apis::DigitalassetlinksV1::AndroidAppAsset, decorator: Google::Apis::DigitalassetlinksV1::AndroidAppAsset::Representation
|
80
|
+
|
81
|
+
property :web, as: 'web', class: Google::Apis::DigitalassetlinksV1::WebAsset, decorator: Google::Apis::DigitalassetlinksV1::WebAsset::Representation
|
82
|
+
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
class CertificateInfo
|
87
|
+
# @private
|
88
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
89
|
+
property :sha256_fingerprint, as: 'sha256Fingerprint'
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
class CheckResponse
|
94
|
+
# @private
|
95
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
96
|
+
property :debug_string, as: 'debugString'
|
97
|
+
collection :error_code, as: 'errorCode'
|
98
|
+
property :linked, as: 'linked'
|
99
|
+
property :max_age, as: 'maxAge'
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
class ListResponse
|
104
|
+
# @private
|
105
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
106
|
+
property :debug_string, as: 'debugString'
|
107
|
+
collection :error_code, as: 'errorCode'
|
108
|
+
property :max_age, as: 'maxAge'
|
109
|
+
collection :statements, as: 'statements', class: Google::Apis::DigitalassetlinksV1::Statement, decorator: Google::Apis::DigitalassetlinksV1::Statement::Representation
|
110
|
+
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
class Statement
|
115
|
+
# @private
|
116
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
117
|
+
property :relation, as: 'relation'
|
118
|
+
property :source, as: 'source', class: Google::Apis::DigitalassetlinksV1::Asset, decorator: Google::Apis::DigitalassetlinksV1::Asset::Representation
|
119
|
+
|
120
|
+
property :target, as: 'target', class: Google::Apis::DigitalassetlinksV1::Asset, decorator: Google::Apis::DigitalassetlinksV1::Asset::Representation
|
121
|
+
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
class WebAsset
|
126
|
+
# @private
|
127
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
128
|
+
property :site, as: 'site'
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
@@ -0,0 +1,324 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
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
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module DigitalassetlinksV1
|
23
|
+
# Digital Asset Links API
|
24
|
+
#
|
25
|
+
# API for discovering relationships between online assets such as web sites or
|
26
|
+
# mobile apps.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/digitalassetlinks_v1'
|
30
|
+
#
|
31
|
+
# Digitalassetlinks = Google::Apis::DigitalassetlinksV1 # Alias the module
|
32
|
+
# service = Digitalassetlinks::DigitalassetlinksService.new
|
33
|
+
#
|
34
|
+
# @see https://developers.google.com/digital-asset-links/
|
35
|
+
class DigitalassetlinksService < Google::Apis::Core::BaseService
|
36
|
+
# @return [String]
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
39
|
+
attr_accessor :key
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
43
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
44
|
+
attr_accessor :quota_user
|
45
|
+
|
46
|
+
def initialize
|
47
|
+
super('https://digitalassetlinks.googleapis.com/', '')
|
48
|
+
@batch_path = 'batch'
|
49
|
+
end
|
50
|
+
|
51
|
+
# Determines whether the specified (directional) relationship exists between
|
52
|
+
# the specified source and target assets.
|
53
|
+
# The relation describes the intent of the link between the two assets as
|
54
|
+
# claimed by the source asset. An example for such relationships is the
|
55
|
+
# delegation of privileges or permissions.
|
56
|
+
# This command is most often used by infrastructure systems to check
|
57
|
+
# preconditions for an action. For example, a client may want to know if it
|
58
|
+
# is OK to send a web URL to a particular mobile app instead. The client can
|
59
|
+
# check for the relevant asset link from the website to the mobile app to
|
60
|
+
# decide if the operation should be allowed.
|
61
|
+
# A note about security: if you specify a secure asset as the source, such as
|
62
|
+
# an HTTPS website or an Android app, the API will ensure that any
|
63
|
+
# statements used to generate the response have been made in a secure way by
|
64
|
+
# the owner of that asset. Conversely, if the source asset is an insecure
|
65
|
+
# HTTP website (that is, the URL starts with `http://` instead of `https://`),
|
66
|
+
# the API cannot verify its statements securely, and it is not possible to
|
67
|
+
# ensure that the website's statements have not been altered by a third
|
68
|
+
# party. For more information, see the [Digital Asset Links technical design
|
69
|
+
# specification](https://github.com/google/digitalassetlinks/blob/master/well-
|
70
|
+
# known/details.md).
|
71
|
+
# @param [String] relation
|
72
|
+
# Query string for the relation.
|
73
|
+
# We identify relations with strings of the format `<kind>/<detail>`, where
|
74
|
+
# `<kind>` must be one of a set of pre-defined purpose categories, and
|
75
|
+
# `<detail>` is a free-form lowercase alphanumeric string that describes the
|
76
|
+
# specific use case of the statement.
|
77
|
+
# Refer to [our API documentation](/digital-asset-links/v1/relation-strings)
|
78
|
+
# for the current list of supported relations.
|
79
|
+
# For a query to match an asset link, both the query's and the asset link's
|
80
|
+
# relation strings must match exactly.
|
81
|
+
# Example: A query with relation `delegate_permission/common.handle_all_urls`
|
82
|
+
# matches an asset link with relation
|
83
|
+
# `delegate_permission/common.handle_all_urls`.
|
84
|
+
# @param [String] source_android_app_certificate_sha256_fingerprint
|
85
|
+
# The uppercase SHA-265 fingerprint of the certificate. From the PEM
|
86
|
+
# certificate, it can be acquired like this:
|
87
|
+
# $ keytool -printcert -file $CERTFILE | grep SHA256:
|
88
|
+
# SHA256: 14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83: \
|
89
|
+
# 42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5
|
90
|
+
# or like this:
|
91
|
+
# $ openssl x509 -in $CERTFILE -noout -fingerprint -sha256
|
92
|
+
# SHA256 Fingerprint=14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64: \
|
93
|
+
# 16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5
|
94
|
+
# In this example, the contents of this field would be `14:6D:E9:83:C5:73:
|
95
|
+
# 06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:
|
96
|
+
# 44:E5`.
|
97
|
+
# If these tools are not available to you, you can convert the PEM
|
98
|
+
# certificate into the DER format, compute the SHA-256 hash of that string
|
99
|
+
# and represent the result as a hexstring (that is, uppercase hexadecimal
|
100
|
+
# representations of each octet, separated by colons).
|
101
|
+
# @param [String] source_android_app_package_name
|
102
|
+
# Android App assets are naturally identified by their Java package name.
|
103
|
+
# For example, the Google Maps app uses the package name
|
104
|
+
# `com.google.android.apps.maps`.
|
105
|
+
# REQUIRED
|
106
|
+
# @param [String] source_web_site
|
107
|
+
# Web assets are identified by a URL that contains only the scheme, hostname
|
108
|
+
# and port parts. The format is
|
109
|
+
# http[s]://<hostname>[:<port>]
|
110
|
+
# Hostnames must be fully qualified: they must end in a single period
|
111
|
+
# ("`.`").
|
112
|
+
# Only the schemes "http" and "https" are currently allowed.
|
113
|
+
# Port numbers are given as a decimal number, and they must be omitted if the
|
114
|
+
# standard port numbers are used: 80 for http and 443 for https.
|
115
|
+
# We call this limited URL the "site". All URLs that share the same scheme,
|
116
|
+
# hostname and port are considered to be a part of the site and thus belong
|
117
|
+
# to the web asset.
|
118
|
+
# Example: the asset with the site `https://www.google.com` contains all
|
119
|
+
# these URLs:
|
120
|
+
# * `https://www.google.com/`
|
121
|
+
# * `https://www.google.com:443/`
|
122
|
+
# * `https://www.google.com/foo`
|
123
|
+
# * `https://www.google.com/foo?bar`
|
124
|
+
# * `https://www.google.com/foo#bar`
|
125
|
+
# * `https://user@password:www.google.com/`
|
126
|
+
# But it does not contain these URLs:
|
127
|
+
# * `http://www.google.com/` (wrong scheme)
|
128
|
+
# * `https://google.com/` (hostname does not match)
|
129
|
+
# * `https://www.google.com:444/` (port does not match)
|
130
|
+
# REQUIRED
|
131
|
+
# @param [String] target_android_app_certificate_sha256_fingerprint
|
132
|
+
# The uppercase SHA-265 fingerprint of the certificate. From the PEM
|
133
|
+
# certificate, it can be acquired like this:
|
134
|
+
# $ keytool -printcert -file $CERTFILE | grep SHA256:
|
135
|
+
# SHA256: 14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83: \
|
136
|
+
# 42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5
|
137
|
+
# or like this:
|
138
|
+
# $ openssl x509 -in $CERTFILE -noout -fingerprint -sha256
|
139
|
+
# SHA256 Fingerprint=14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64: \
|
140
|
+
# 16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5
|
141
|
+
# In this example, the contents of this field would be `14:6D:E9:83:C5:73:
|
142
|
+
# 06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:
|
143
|
+
# 44:E5`.
|
144
|
+
# If these tools are not available to you, you can convert the PEM
|
145
|
+
# certificate into the DER format, compute the SHA-256 hash of that string
|
146
|
+
# and represent the result as a hexstring (that is, uppercase hexadecimal
|
147
|
+
# representations of each octet, separated by colons).
|
148
|
+
# @param [String] target_android_app_package_name
|
149
|
+
# Android App assets are naturally identified by their Java package name.
|
150
|
+
# For example, the Google Maps app uses the package name
|
151
|
+
# `com.google.android.apps.maps`.
|
152
|
+
# REQUIRED
|
153
|
+
# @param [String] target_web_site
|
154
|
+
# Web assets are identified by a URL that contains only the scheme, hostname
|
155
|
+
# and port parts. The format is
|
156
|
+
# http[s]://<hostname>[:<port>]
|
157
|
+
# Hostnames must be fully qualified: they must end in a single period
|
158
|
+
# ("`.`").
|
159
|
+
# Only the schemes "http" and "https" are currently allowed.
|
160
|
+
# Port numbers are given as a decimal number, and they must be omitted if the
|
161
|
+
# standard port numbers are used: 80 for http and 443 for https.
|
162
|
+
# We call this limited URL the "site". All URLs that share the same scheme,
|
163
|
+
# hostname and port are considered to be a part of the site and thus belong
|
164
|
+
# to the web asset.
|
165
|
+
# Example: the asset with the site `https://www.google.com` contains all
|
166
|
+
# these URLs:
|
167
|
+
# * `https://www.google.com/`
|
168
|
+
# * `https://www.google.com:443/`
|
169
|
+
# * `https://www.google.com/foo`
|
170
|
+
# * `https://www.google.com/foo?bar`
|
171
|
+
# * `https://www.google.com/foo#bar`
|
172
|
+
# * `https://user@password:www.google.com/`
|
173
|
+
# But it does not contain these URLs:
|
174
|
+
# * `http://www.google.com/` (wrong scheme)
|
175
|
+
# * `https://google.com/` (hostname does not match)
|
176
|
+
# * `https://www.google.com:444/` (port does not match)
|
177
|
+
# REQUIRED
|
178
|
+
# @param [String] fields
|
179
|
+
# Selector specifying which fields to include in a partial response.
|
180
|
+
# @param [String] quota_user
|
181
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
182
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
183
|
+
# @param [Google::Apis::RequestOptions] options
|
184
|
+
# Request-specific options
|
185
|
+
#
|
186
|
+
# @yield [result, err] Result & error if block supplied
|
187
|
+
# @yieldparam result [Google::Apis::DigitalassetlinksV1::CheckResponse] parsed result object
|
188
|
+
# @yieldparam err [StandardError] error object if request failed
|
189
|
+
#
|
190
|
+
# @return [Google::Apis::DigitalassetlinksV1::CheckResponse]
|
191
|
+
#
|
192
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
193
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
194
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
195
|
+
def check_assetlink(relation: nil, source_android_app_certificate_sha256_fingerprint: nil, source_android_app_package_name: nil, source_web_site: nil, target_android_app_certificate_sha256_fingerprint: nil, target_android_app_package_name: nil, target_web_site: nil, fields: nil, quota_user: nil, options: nil, &block)
|
196
|
+
command = make_simple_command(:get, 'v1/assetlinks:check', options)
|
197
|
+
command.response_representation = Google::Apis::DigitalassetlinksV1::CheckResponse::Representation
|
198
|
+
command.response_class = Google::Apis::DigitalassetlinksV1::CheckResponse
|
199
|
+
command.query['relation'] = relation unless relation.nil?
|
200
|
+
command.query['source.androidApp.certificate.sha256Fingerprint'] = source_android_app_certificate_sha256_fingerprint unless source_android_app_certificate_sha256_fingerprint.nil?
|
201
|
+
command.query['source.androidApp.packageName'] = source_android_app_package_name unless source_android_app_package_name.nil?
|
202
|
+
command.query['source.web.site'] = source_web_site unless source_web_site.nil?
|
203
|
+
command.query['target.androidApp.certificate.sha256Fingerprint'] = target_android_app_certificate_sha256_fingerprint unless target_android_app_certificate_sha256_fingerprint.nil?
|
204
|
+
command.query['target.androidApp.packageName'] = target_android_app_package_name unless target_android_app_package_name.nil?
|
205
|
+
command.query['target.web.site'] = target_web_site unless target_web_site.nil?
|
206
|
+
command.query['fields'] = fields unless fields.nil?
|
207
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
208
|
+
execute_or_queue_command(command, &block)
|
209
|
+
end
|
210
|
+
|
211
|
+
# Retrieves a list of all statements from a given source that match the
|
212
|
+
# specified target and statement string.
|
213
|
+
# The API guarantees that all statements with secure source assets, such as
|
214
|
+
# HTTPS websites or Android apps, have been made in a secure way by the owner
|
215
|
+
# of those assets, as described in the [Digital Asset Links technical design
|
216
|
+
# specification](https://github.com/google/digitalassetlinks/blob/master/well-
|
217
|
+
# known/details.md).
|
218
|
+
# Specifically, you should consider that for insecure websites (that is,
|
219
|
+
# where the URL starts with `http://` instead of `https://`), this guarantee
|
220
|
+
# cannot be made.
|
221
|
+
# The `List` command is most useful in cases where the API client wants to
|
222
|
+
# know all the ways in which two assets are related, or enumerate all the
|
223
|
+
# relationships from a particular source asset. Example: a feature that
|
224
|
+
# helps users navigate to related items. When a mobile app is running on a
|
225
|
+
# device, the feature would make it easy to navigate to the corresponding web
|
226
|
+
# site or Google+ profile.
|
227
|
+
# @param [String] relation
|
228
|
+
# Use only associations that match the specified relation.
|
229
|
+
# See the [`Statement`](#Statement) message for a detailed definition of
|
230
|
+
# relation strings.
|
231
|
+
# For a query to match a statement, one of the following must be true:
|
232
|
+
# * both the query's and the statement's relation strings match exactly,
|
233
|
+
# or
|
234
|
+
# * the query's relation string is empty or missing.
|
235
|
+
# Example: A query with relation `delegate_permission/common.handle_all_urls`
|
236
|
+
# matches an asset link with relation
|
237
|
+
# `delegate_permission/common.handle_all_urls`.
|
238
|
+
# @param [String] source_android_app_certificate_sha256_fingerprint
|
239
|
+
# The uppercase SHA-265 fingerprint of the certificate. From the PEM
|
240
|
+
# certificate, it can be acquired like this:
|
241
|
+
# $ keytool -printcert -file $CERTFILE | grep SHA256:
|
242
|
+
# SHA256: 14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83: \
|
243
|
+
# 42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5
|
244
|
+
# or like this:
|
245
|
+
# $ openssl x509 -in $CERTFILE -noout -fingerprint -sha256
|
246
|
+
# SHA256 Fingerprint=14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64: \
|
247
|
+
# 16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5
|
248
|
+
# In this example, the contents of this field would be `14:6D:E9:83:C5:73:
|
249
|
+
# 06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:
|
250
|
+
# 44:E5`.
|
251
|
+
# If these tools are not available to you, you can convert the PEM
|
252
|
+
# certificate into the DER format, compute the SHA-256 hash of that string
|
253
|
+
# and represent the result as a hexstring (that is, uppercase hexadecimal
|
254
|
+
# representations of each octet, separated by colons).
|
255
|
+
# @param [String] source_android_app_package_name
|
256
|
+
# Android App assets are naturally identified by their Java package name.
|
257
|
+
# For example, the Google Maps app uses the package name
|
258
|
+
# `com.google.android.apps.maps`.
|
259
|
+
# REQUIRED
|
260
|
+
# @param [String] source_web_site
|
261
|
+
# Web assets are identified by a URL that contains only the scheme, hostname
|
262
|
+
# and port parts. The format is
|
263
|
+
# http[s]://<hostname>[:<port>]
|
264
|
+
# Hostnames must be fully qualified: they must end in a single period
|
265
|
+
# ("`.`").
|
266
|
+
# Only the schemes "http" and "https" are currently allowed.
|
267
|
+
# Port numbers are given as a decimal number, and they must be omitted if the
|
268
|
+
# standard port numbers are used: 80 for http and 443 for https.
|
269
|
+
# We call this limited URL the "site". All URLs that share the same scheme,
|
270
|
+
# hostname and port are considered to be a part of the site and thus belong
|
271
|
+
# to the web asset.
|
272
|
+
# Example: the asset with the site `https://www.google.com` contains all
|
273
|
+
# these URLs:
|
274
|
+
# * `https://www.google.com/`
|
275
|
+
# * `https://www.google.com:443/`
|
276
|
+
# * `https://www.google.com/foo`
|
277
|
+
# * `https://www.google.com/foo?bar`
|
278
|
+
# * `https://www.google.com/foo#bar`
|
279
|
+
# * `https://user@password:www.google.com/`
|
280
|
+
# But it does not contain these URLs:
|
281
|
+
# * `http://www.google.com/` (wrong scheme)
|
282
|
+
# * `https://google.com/` (hostname does not match)
|
283
|
+
# * `https://www.google.com:444/` (port does not match)
|
284
|
+
# REQUIRED
|
285
|
+
# @param [String] fields
|
286
|
+
# Selector specifying which fields to include in a partial response.
|
287
|
+
# @param [String] quota_user
|
288
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
289
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
290
|
+
# @param [Google::Apis::RequestOptions] options
|
291
|
+
# Request-specific options
|
292
|
+
#
|
293
|
+
# @yield [result, err] Result & error if block supplied
|
294
|
+
# @yieldparam result [Google::Apis::DigitalassetlinksV1::ListResponse] parsed result object
|
295
|
+
# @yieldparam err [StandardError] error object if request failed
|
296
|
+
#
|
297
|
+
# @return [Google::Apis::DigitalassetlinksV1::ListResponse]
|
298
|
+
#
|
299
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
300
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
301
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
302
|
+
def list_statements(relation: nil, source_android_app_certificate_sha256_fingerprint: nil, source_android_app_package_name: nil, source_web_site: nil, fields: nil, quota_user: nil, options: nil, &block)
|
303
|
+
command = make_simple_command(:get, 'v1/statements:list', options)
|
304
|
+
command.response_representation = Google::Apis::DigitalassetlinksV1::ListResponse::Representation
|
305
|
+
command.response_class = Google::Apis::DigitalassetlinksV1::ListResponse
|
306
|
+
command.query['relation'] = relation unless relation.nil?
|
307
|
+
command.query['source.androidApp.certificate.sha256Fingerprint'] = source_android_app_certificate_sha256_fingerprint unless source_android_app_certificate_sha256_fingerprint.nil?
|
308
|
+
command.query['source.androidApp.packageName'] = source_android_app_package_name unless source_android_app_package_name.nil?
|
309
|
+
command.query['source.web.site'] = source_web_site unless source_web_site.nil?
|
310
|
+
command.query['fields'] = fields unless fields.nil?
|
311
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
312
|
+
execute_or_queue_command(command, &block)
|
313
|
+
end
|
314
|
+
|
315
|
+
protected
|
316
|
+
|
317
|
+
def apply_command_defaults(command)
|
318
|
+
command.query['key'] = key unless key.nil?
|
319
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
320
|
+
end
|
321
|
+
end
|
322
|
+
end
|
323
|
+
end
|
324
|
+
end
|