File: classes.rb

package info (click to toggle)
ruby-google-api-client 0.53.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 75,020 kB
  • sloc: ruby: 626,567; makefile: 4
file content (279 lines) | stat: -rw-r--r-- 12,301 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# Copyright 2015 Google Inc.
#
# 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.

require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'

module Google
  module Apis
    module DigitalassetlinksV1
      
      # Describes an android app asset.
      class AndroidAppAsset
        include Google::Apis::Core::Hashable
      
        # Describes an X509 certificate.
        # Corresponds to the JSON property `certificate`
        # @return [Google::Apis::DigitalassetlinksV1::CertificateInfo]
        attr_accessor :certificate
      
        # Android App assets are naturally identified by their Java package name. For
        # example, the Google Maps app uses the package name `com.google.android.apps.
        # maps`. REQUIRED
        # Corresponds to the JSON property `packageName`
        # @return [String]
        attr_accessor :package_name
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @certificate = args[:certificate] if args.key?(:certificate)
          @package_name = args[:package_name] if args.key?(:package_name)
        end
      end
      
      # Uniquely identifies an asset. A digital asset is an identifiable and
      # addressable online entity that typically provides some service or content.
      # Examples of assets are websites, Android apps, Twitter feeds, and Plus Pages.
      class Asset
        include Google::Apis::Core::Hashable
      
        # Describes an android app asset.
        # Corresponds to the JSON property `androidApp`
        # @return [Google::Apis::DigitalassetlinksV1::AndroidAppAsset]
        attr_accessor :android_app
      
        # Describes a web asset.
        # Corresponds to the JSON property `web`
        # @return [Google::Apis::DigitalassetlinksV1::WebAsset]
        attr_accessor :web
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @android_app = args[:android_app] if args.key?(:android_app)
          @web = args[:web] if args.key?(:web)
        end
      end
      
      # Describes an X509 certificate.
      class CertificateInfo
        include Google::Apis::Core::Hashable
      
        # The uppercase SHA-265 fingerprint of the certificate. From the PEM certificate,
        # it can be acquired like this: $ keytool -printcert -file $CERTFILE | grep
        # SHA256: SHA256: 14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83: \ 42:
        # E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 or like this: $ openssl x509 -in $CERTFILE
        # -noout -fingerprint -sha256 SHA256 Fingerprint=14:6D:E9:83:C5:73:06:50:D8:EE:
        # B9:95:2F:34:FC:64: \ 16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 In this
        # example, the contents of this field would be `14:6D:E9:83:C5:73: 06:50:D8:EE:
        # B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF: 44:E5`. If these
        # tools are not available to you, you can convert the PEM certificate into the
        # DER format, compute the SHA-256 hash of that string and represent the result
        # as a hexstring (that is, uppercase hexadecimal representations of each octet,
        # separated by colons).
        # Corresponds to the JSON property `sha256Fingerprint`
        # @return [String]
        attr_accessor :sha256_fingerprint
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @sha256_fingerprint = args[:sha256_fingerprint] if args.key?(:sha256_fingerprint)
        end
      end
      
      # Response message for the CheckAssetLinks call.
      class CheckResponse
        include Google::Apis::Core::Hashable
      
        # Human-readable message containing information intended to help end users
        # understand, reproduce and debug the result. The message will be in English and
        # we are currently not planning to offer any translations. Please note that no
        # guarantees are made about the contents or format of this string. Any aspect of
        # it may be subject to change without notice. You should not attempt to
        # programmatically parse this data. For programmatic access, use the error_code
        # field below.
        # Corresponds to the JSON property `debugString`
        # @return [String]
        attr_accessor :debug_string
      
        # Error codes that describe the result of the Check operation.
        # Corresponds to the JSON property `errorCode`
        # @return [Array<String>]
        attr_accessor :error_code
      
        # Set to true if the assets specified in the request are linked by the relation
        # specified in the request.
        # Corresponds to the JSON property `linked`
        # @return [Boolean]
        attr_accessor :linked
        alias_method :linked?, :linked
      
        # From serving time, how much longer the response should be considered valid
        # barring further updates. REQUIRED
        # Corresponds to the JSON property `maxAge`
        # @return [String]
        attr_accessor :max_age
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @debug_string = args[:debug_string] if args.key?(:debug_string)
          @error_code = args[:error_code] if args.key?(:error_code)
          @linked = args[:linked] if args.key?(:linked)
          @max_age = args[:max_age] if args.key?(:max_age)
        end
      end
      
      # Response message for the List call.
      class ListResponse
        include Google::Apis::Core::Hashable
      
        # Human-readable message containing information intended to help end users
        # understand, reproduce and debug the result. The message will be in English and
        # we are currently not planning to offer any translations. Please note that no
        # guarantees are made about the contents or format of this string. Any aspect of
        # it may be subject to change without notice. You should not attempt to
        # programmatically parse this data. For programmatic access, use the error_code
        # field below.
        # Corresponds to the JSON property `debugString`
        # @return [String]
        attr_accessor :debug_string
      
        # Error codes that describe the result of the List operation.
        # Corresponds to the JSON property `errorCode`
        # @return [Array<String>]
        attr_accessor :error_code
      
        # From serving time, how much longer the response should be considered valid
        # barring further updates. REQUIRED
        # Corresponds to the JSON property `maxAge`
        # @return [String]
        attr_accessor :max_age
      
        # A list of all the matching statements that have been found.
        # Corresponds to the JSON property `statements`
        # @return [Array<Google::Apis::DigitalassetlinksV1::Statement>]
        attr_accessor :statements
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @debug_string = args[:debug_string] if args.key?(:debug_string)
          @error_code = args[:error_code] if args.key?(:error_code)
          @max_age = args[:max_age] if args.key?(:max_age)
          @statements = args[:statements] if args.key?(:statements)
        end
      end
      
      # Describes a reliable statement that has been made about the relationship
      # between a source asset and a target asset. Statements are always made by the
      # source asset, either directly or by delegating to a statement list that is
      # stored elsewhere. For more detailed definitions of statements and assets,
      # please refer to our [API documentation landing page](/digital-asset-links/v1/
      # getting-started).
      class Statement
        include Google::Apis::Core::Hashable
      
        # The relation identifies the use of the statement as intended by the source
        # asset's owner (that is, the person or entity who issued the statement). Every
        # complete statement has a relation. We identify relations with strings of the
        # format `/`, where `` must be one of a set of pre-defined purpose categories,
        # and `` is a free-form lowercase alphanumeric string that describes the
        # specific use case of the statement. Refer to [our API documentation](/digital-
        # asset-links/v1/relation-strings) for the current list of supported relations.
        # Example: `delegate_permission/common.handle_all_urls` REQUIRED
        # Corresponds to the JSON property `relation`
        # @return [String]
        attr_accessor :relation
      
        # Uniquely identifies an asset. A digital asset is an identifiable and
        # addressable online entity that typically provides some service or content.
        # Examples of assets are websites, Android apps, Twitter feeds, and Plus Pages.
        # Corresponds to the JSON property `source`
        # @return [Google::Apis::DigitalassetlinksV1::Asset]
        attr_accessor :source
      
        # Uniquely identifies an asset. A digital asset is an identifiable and
        # addressable online entity that typically provides some service or content.
        # Examples of assets are websites, Android apps, Twitter feeds, and Plus Pages.
        # Corresponds to the JSON property `target`
        # @return [Google::Apis::DigitalassetlinksV1::Asset]
        attr_accessor :target
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @relation = args[:relation] if args.key?(:relation)
          @source = args[:source] if args.key?(:source)
          @target = args[:target] if args.key?(:target)
        end
      end
      
      # Describes a web asset.
      class WebAsset
        include Google::Apis::Core::Hashable
      
        # Web assets are identified by a URL that contains only the scheme, hostname and
        # port parts. The format is http[s]://[:] Hostnames must be fully qualified:
        # they must end in a single period ("`.`"). Only the schemes "http" and "https"
        # are currently allowed. Port numbers are given as a decimal number, and they
        # must be omitted if the standard port numbers are used: 80 for http and 443 for
        # https. We call this limited URL the "site". All URLs that share the same
        # scheme, hostname and port are considered to be a part of the site and thus
        # belong to the web asset. Example: the asset with the site `https://www.google.
        # com` contains all these URLs: * `https://www.google.com/` * `https://www.
        # google.com:443/` * `https://www.google.com/foo` * `https://www.google.com/foo?
        # bar` * `https://www.google.com/foo#bar` * `https://user@password:www.google.
        # com/` But it does not contain these URLs: * `http://www.google.com/` (wrong
        # scheme) * `https://google.com/` (hostname does not match) * `https://www.
        # google.com:444/` (port does not match) REQUIRED
        # Corresponds to the JSON property `site`
        # @return [String]
        attr_accessor :site
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @site = args[:site] if args.key?(:site)
        end
      end
    end
  end
end