google-cloud-video-stitcher-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/LICENSE.md +201 -0
- data/README.md +139 -0
- data/lib/google/cloud/video/stitcher/v1/ad_tag_details_pb.rb +52 -0
- data/lib/google/cloud/video/stitcher/v1/cdn_keys_pb.rb +40 -0
- data/lib/google/cloud/video/stitcher/v1/companions_pb.rb +63 -0
- data/lib/google/cloud/video/stitcher/v1/events_pb.rb +61 -0
- data/lib/google/cloud/video/stitcher/v1/sessions_pb.rb +98 -0
- data/lib/google/cloud/video/stitcher/v1/slates_pb.rb +27 -0
- data/lib/google/cloud/video/stitcher/v1/stitch_details_pb.rb +37 -0
- data/lib/google/cloud/video/stitcher/v1/version.rb +30 -0
- data/lib/google/cloud/video/stitcher/v1/video_stitcher_service/client.rb +2307 -0
- data/lib/google/cloud/video/stitcher/v1/video_stitcher_service/credentials.rb +49 -0
- data/lib/google/cloud/video/stitcher/v1/video_stitcher_service/paths.rb +191 -0
- data/lib/google/cloud/video/stitcher/v1/video_stitcher_service.rb +55 -0
- data/lib/google/cloud/video/stitcher/v1/video_stitcher_service_pb.rb +162 -0
- data/lib/google/cloud/video/stitcher/v1/video_stitcher_service_services_pb.rb +93 -0
- data/lib/google/cloud/video/stitcher/v1.rb +40 -0
- data/lib/google-cloud-video-stitcher-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/video/stitcher/v1/ad_tag_details.rb +102 -0
- data/proto_docs/google/cloud/video/stitcher/v1/cdn_keys.rb +71 -0
- data/proto_docs/google/cloud/video/stitcher/v1/companions.rb +129 -0
- data/proto_docs/google/cloud/video/stitcher/v1/events.rb +141 -0
- data/proto_docs/google/cloud/video/stitcher/v1/sessions.rb +287 -0
- data/proto_docs/google/cloud/video/stitcher/v1/slates.rb +42 -0
- data/proto_docs/google/cloud/video/stitcher/v1/stitch_details.rb +71 -0
- data/proto_docs/google/cloud/video/stitcher/v1/video_stitcher_service.rb +378 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- metadata +230 -0
@@ -0,0 +1,378 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Video
|
23
|
+
module Stitcher
|
24
|
+
module V1
|
25
|
+
# Request message for VideoStitcherService.createCdnKey.
|
26
|
+
# @!attribute [rw] parent
|
27
|
+
# @return [::String]
|
28
|
+
# Required. The project in which the CDN key should be created, in the form of
|
29
|
+
# `projects/{project_number}/locations/{location}`.
|
30
|
+
# @!attribute [rw] cdn_key
|
31
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::CdnKey]
|
32
|
+
# Required. The CDN key resource to create.
|
33
|
+
# @!attribute [rw] cdn_key_id
|
34
|
+
# @return [::String]
|
35
|
+
# Required. The ID to use for the CDN key, which will become the final component of
|
36
|
+
# the CDN key's resource name.
|
37
|
+
#
|
38
|
+
# This value should conform to RFC-1034, which restricts to
|
39
|
+
# lower-case letters, numbers, and hyphen, with the first character a
|
40
|
+
# letter, the last a letter or a number, and a 63 character maximum.
|
41
|
+
class CreateCdnKeyRequest
|
42
|
+
include ::Google::Protobuf::MessageExts
|
43
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
44
|
+
end
|
45
|
+
|
46
|
+
# Request message for VideoStitcherService.listCdnKeys.
|
47
|
+
# @!attribute [rw] parent
|
48
|
+
# @return [::String]
|
49
|
+
# Required. The project that contains the list of CDN keys, in the form of
|
50
|
+
# `projects/{project_number}/locations/{location}`.
|
51
|
+
# @!attribute [rw] page_size
|
52
|
+
# @return [::Integer]
|
53
|
+
# Requested page size. Server may return fewer items than requested.
|
54
|
+
# If unspecified, server will pick an appropriate default.
|
55
|
+
# @!attribute [rw] page_token
|
56
|
+
# @return [::String]
|
57
|
+
# A token identifying a page of results the server should return.
|
58
|
+
# @!attribute [rw] filter
|
59
|
+
# @return [::String]
|
60
|
+
# Filtering results
|
61
|
+
# @!attribute [rw] order_by
|
62
|
+
# @return [::String]
|
63
|
+
# Hint for how to order the results
|
64
|
+
class ListCdnKeysRequest
|
65
|
+
include ::Google::Protobuf::MessageExts
|
66
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
67
|
+
end
|
68
|
+
|
69
|
+
# Response message for VideoStitcher.ListCdnKeys.
|
70
|
+
# @!attribute [rw] cdn_keys
|
71
|
+
# @return [::Array<::Google::Cloud::Video::Stitcher::V1::CdnKey>]
|
72
|
+
# List of CDN keys.
|
73
|
+
# @!attribute [rw] next_page_token
|
74
|
+
# @return [::String]
|
75
|
+
# A token identifying a page of results the server should return.
|
76
|
+
# @!attribute [rw] unreachable
|
77
|
+
# @return [::Array<::String>]
|
78
|
+
# Locations that could not be reached.
|
79
|
+
class ListCdnKeysResponse
|
80
|
+
include ::Google::Protobuf::MessageExts
|
81
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
82
|
+
end
|
83
|
+
|
84
|
+
# Request message for VideoStitcherService.getCdnKey.
|
85
|
+
# @!attribute [rw] name
|
86
|
+
# @return [::String]
|
87
|
+
# Required. The name of the CDN key to be retrieved, in the form of
|
88
|
+
# `projects/{project}/locations/{location}/cdnKeys/{id}`.
|
89
|
+
class GetCdnKeyRequest
|
90
|
+
include ::Google::Protobuf::MessageExts
|
91
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
92
|
+
end
|
93
|
+
|
94
|
+
# Request message for VideoStitcherService.deleteCdnKey.
|
95
|
+
# @!attribute [rw] name
|
96
|
+
# @return [::String]
|
97
|
+
# Required. The name of the CDN key to be deleted, in the form of
|
98
|
+
# `projects/{project_number}/locations/{location}/cdnKeys/{id}`.
|
99
|
+
class DeleteCdnKeyRequest
|
100
|
+
include ::Google::Protobuf::MessageExts
|
101
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
102
|
+
end
|
103
|
+
|
104
|
+
# Request message for VideoStitcherService.updateCdnKey.
|
105
|
+
# @!attribute [rw] cdn_key
|
106
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::CdnKey]
|
107
|
+
# Required. The CDN key resource which replaces the resource on the server.
|
108
|
+
# @!attribute [rw] update_mask
|
109
|
+
# @return [::Google::Protobuf::FieldMask]
|
110
|
+
# Required. The update mask applies to the resource.
|
111
|
+
# For the `FieldMask` definition, see
|
112
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
113
|
+
class UpdateCdnKeyRequest
|
114
|
+
include ::Google::Protobuf::MessageExts
|
115
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
116
|
+
end
|
117
|
+
|
118
|
+
# Request message for VideoStitcherService.createVodSession
|
119
|
+
# @!attribute [rw] parent
|
120
|
+
# @return [::String]
|
121
|
+
# Required. The project and location in which the VOD session should be created, in the
|
122
|
+
# form of `projects/{project_number}/locations/{location}`.
|
123
|
+
# @!attribute [rw] vod_session
|
124
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::VodSession]
|
125
|
+
# Required. Parameters for creating a session.
|
126
|
+
class CreateVodSessionRequest
|
127
|
+
include ::Google::Protobuf::MessageExts
|
128
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
129
|
+
end
|
130
|
+
|
131
|
+
# Request message for VideoStitcherService.getVodSession
|
132
|
+
# @!attribute [rw] name
|
133
|
+
# @return [::String]
|
134
|
+
# Required. The name of the VOD session to be retrieved, in the form of
|
135
|
+
# `projects/{project_number}/locations/{location}/vodSessions/{id}`.
|
136
|
+
class GetVodSessionRequest
|
137
|
+
include ::Google::Protobuf::MessageExts
|
138
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
139
|
+
end
|
140
|
+
|
141
|
+
# Request message for VideoStitcherService.listVodStitchDetails.
|
142
|
+
# @!attribute [rw] parent
|
143
|
+
# @return [::String]
|
144
|
+
# Required. The VOD session where the stitch details belong to, in the form of
|
145
|
+
# `projects/{project}/locations/{location}/vodSessions/{id}`.
|
146
|
+
# @!attribute [rw] page_size
|
147
|
+
# @return [::Integer]
|
148
|
+
# The maximum number of items to return.
|
149
|
+
# @!attribute [rw] page_token
|
150
|
+
# @return [::String]
|
151
|
+
# The next_page_token value returned from a previous List request, if any.
|
152
|
+
class ListVodStitchDetailsRequest
|
153
|
+
include ::Google::Protobuf::MessageExts
|
154
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
155
|
+
end
|
156
|
+
|
157
|
+
# Response message for VideoStitcherService.listVodStitchDetails.
|
158
|
+
# @!attribute [rw] vod_stitch_details
|
159
|
+
# @return [::Array<::Google::Cloud::Video::Stitcher::V1::VodStitchDetail>]
|
160
|
+
# A List of stitch Details.
|
161
|
+
# @!attribute [rw] next_page_token
|
162
|
+
# @return [::String]
|
163
|
+
# The pagination token.
|
164
|
+
class ListVodStitchDetailsResponse
|
165
|
+
include ::Google::Protobuf::MessageExts
|
166
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
167
|
+
end
|
168
|
+
|
169
|
+
# Request message for VideoStitcherService.getVodStitchDetail.
|
170
|
+
# @!attribute [rw] name
|
171
|
+
# @return [::String]
|
172
|
+
# Required. The name of the stitch detail in the specified VOD session, in the form of
|
173
|
+
# `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`.
|
174
|
+
class GetVodStitchDetailRequest
|
175
|
+
include ::Google::Protobuf::MessageExts
|
176
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
177
|
+
end
|
178
|
+
|
179
|
+
# Request message for VideoStitcherService.listVodAdTagDetails.
|
180
|
+
# @!attribute [rw] parent
|
181
|
+
# @return [::String]
|
182
|
+
# Required. The VOD session which the ad tag details belong to, in the form of
|
183
|
+
# `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`.
|
184
|
+
# @!attribute [rw] page_size
|
185
|
+
# @return [::Integer]
|
186
|
+
# The maximum number of items to return.
|
187
|
+
# @!attribute [rw] page_token
|
188
|
+
# @return [::String]
|
189
|
+
# The next_page_token value returned from a previous List request, if any.
|
190
|
+
class ListVodAdTagDetailsRequest
|
191
|
+
include ::Google::Protobuf::MessageExts
|
192
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
193
|
+
end
|
194
|
+
|
195
|
+
# Response message for VideoStitcherService.listVodAdTagDetails.
|
196
|
+
# @!attribute [rw] vod_ad_tag_details
|
197
|
+
# @return [::Array<::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail>]
|
198
|
+
# A List of ad tag details.
|
199
|
+
# @!attribute [rw] next_page_token
|
200
|
+
# @return [::String]
|
201
|
+
# The pagination token.
|
202
|
+
class ListVodAdTagDetailsResponse
|
203
|
+
include ::Google::Protobuf::MessageExts
|
204
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
205
|
+
end
|
206
|
+
|
207
|
+
# Request message for VideoStitcherService.getVodAdTagDetail
|
208
|
+
# @!attribute [rw] name
|
209
|
+
# @return [::String]
|
210
|
+
# Required. The name of the ad tag detail for the specified VOD session, in the form of
|
211
|
+
# `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`.
|
212
|
+
class GetVodAdTagDetailRequest
|
213
|
+
include ::Google::Protobuf::MessageExts
|
214
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
215
|
+
end
|
216
|
+
|
217
|
+
# Request message for VideoStitcherService.listLiveAdTagDetails.
|
218
|
+
# @!attribute [rw] parent
|
219
|
+
# @return [::String]
|
220
|
+
# Required. The resource parent in the form of
|
221
|
+
# `projects/{project}/locations/{location}/liveSessions/{live_session}`.
|
222
|
+
# @!attribute [rw] page_size
|
223
|
+
# @return [::Integer]
|
224
|
+
# The maximum number of items to return.
|
225
|
+
# @!attribute [rw] page_token
|
226
|
+
# @return [::String]
|
227
|
+
# The pagination token returned from a previous List request.
|
228
|
+
class ListLiveAdTagDetailsRequest
|
229
|
+
include ::Google::Protobuf::MessageExts
|
230
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
231
|
+
end
|
232
|
+
|
233
|
+
# Response message for VideoStitcherService.listLiveAdTagDetails.
|
234
|
+
# @!attribute [rw] live_ad_tag_details
|
235
|
+
# @return [::Array<::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail>]
|
236
|
+
# A list of live session ad tag details.
|
237
|
+
# @!attribute [rw] next_page_token
|
238
|
+
# @return [::String]
|
239
|
+
# The pagination token.
|
240
|
+
class ListLiveAdTagDetailsResponse
|
241
|
+
include ::Google::Protobuf::MessageExts
|
242
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
243
|
+
end
|
244
|
+
|
245
|
+
# Request message for VideoStitcherService.getLiveAdTagDetail
|
246
|
+
# @!attribute [rw] name
|
247
|
+
# @return [::String]
|
248
|
+
# Required. The resource name in the form of
|
249
|
+
# `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`.
|
250
|
+
class GetLiveAdTagDetailRequest
|
251
|
+
include ::Google::Protobuf::MessageExts
|
252
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
253
|
+
end
|
254
|
+
|
255
|
+
# Request message for VideoStitcherService.createSlate.
|
256
|
+
# @!attribute [rw] parent
|
257
|
+
# @return [::String]
|
258
|
+
# Required. The project in which the slate should be created, in the form of
|
259
|
+
# `projects/{project_number}`.
|
260
|
+
# @!attribute [rw] slate_id
|
261
|
+
# @return [::String]
|
262
|
+
# Required. The unique identifier for the slate.
|
263
|
+
# This value should conform to RFC-1034, which restricts to
|
264
|
+
# lower-case letters, numbers, and hyphen, with the first character a
|
265
|
+
# letter, the last a letter or a number, and a 63 character maximum.
|
266
|
+
# @!attribute [rw] slate
|
267
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::Slate]
|
268
|
+
# Required. The slate to create.
|
269
|
+
class CreateSlateRequest
|
270
|
+
include ::Google::Protobuf::MessageExts
|
271
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
272
|
+
end
|
273
|
+
|
274
|
+
# Request message for VideoStitcherService.getSlate.
|
275
|
+
# @!attribute [rw] name
|
276
|
+
# @return [::String]
|
277
|
+
# Required. The name of the slate to be retrieved, of the slate, in the form of
|
278
|
+
# `projects/{project_number}/locations/{location}/slates/{id}`.
|
279
|
+
class GetSlateRequest
|
280
|
+
include ::Google::Protobuf::MessageExts
|
281
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
282
|
+
end
|
283
|
+
|
284
|
+
# Request message for VideoStitcherService.listSlates.
|
285
|
+
# @!attribute [rw] parent
|
286
|
+
# @return [::String]
|
287
|
+
# Required. The project to list slates, in the form of `projects/{project_number}`.
|
288
|
+
# @!attribute [rw] page_size
|
289
|
+
# @return [::Integer]
|
290
|
+
# Requested page size. Server may return fewer items than requested.
|
291
|
+
# If unspecified, server will pick an appropriate default.
|
292
|
+
# @!attribute [rw] page_token
|
293
|
+
# @return [::String]
|
294
|
+
# A token identifying a page of results the server should return.
|
295
|
+
# @!attribute [rw] filter
|
296
|
+
# @return [::String]
|
297
|
+
# Filtering results
|
298
|
+
# @!attribute [rw] order_by
|
299
|
+
# @return [::String]
|
300
|
+
# Hint for how to order the results
|
301
|
+
class ListSlatesRequest
|
302
|
+
include ::Google::Protobuf::MessageExts
|
303
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
304
|
+
end
|
305
|
+
|
306
|
+
# Response message for VideoStitcherService.listSlates.
|
307
|
+
# @!attribute [rw] slates
|
308
|
+
# @return [::Array<::Google::Cloud::Video::Stitcher::V1::Slate>]
|
309
|
+
# The list of slates
|
310
|
+
# @!attribute [rw] next_page_token
|
311
|
+
# @return [::String]
|
312
|
+
# A token identifying a page of results the server should return.
|
313
|
+
# @!attribute [rw] unreachable
|
314
|
+
# @return [::Array<::String>]
|
315
|
+
# Locations that could not be reached.
|
316
|
+
class ListSlatesResponse
|
317
|
+
include ::Google::Protobuf::MessageExts
|
318
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
319
|
+
end
|
320
|
+
|
321
|
+
# Request message for VideoStitcherService.updateSlate.
|
322
|
+
# @!attribute [rw] slate
|
323
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::Slate]
|
324
|
+
# Required. The resource with updated fields.
|
325
|
+
# @!attribute [rw] update_mask
|
326
|
+
# @return [::Google::Protobuf::FieldMask]
|
327
|
+
# Required. The update mask which specifies fields which should be updated.
|
328
|
+
class UpdateSlateRequest
|
329
|
+
include ::Google::Protobuf::MessageExts
|
330
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
331
|
+
end
|
332
|
+
|
333
|
+
# Request message for VideoStitcherService.deleteSlate.
|
334
|
+
# @!attribute [rw] name
|
335
|
+
# @return [::String]
|
336
|
+
# Required. The name of the slate to be deleted, in the form of
|
337
|
+
# `projects/{project_number}/locations/{location}/slates/{id}`.
|
338
|
+
class DeleteSlateRequest
|
339
|
+
include ::Google::Protobuf::MessageExts
|
340
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
341
|
+
end
|
342
|
+
|
343
|
+
# Request message for VideoStitcherService.createLiveSession.
|
344
|
+
# @!attribute [rw] parent
|
345
|
+
# @return [::String]
|
346
|
+
# Required. The project and location in which the live session should be created,
|
347
|
+
# in the form of `projects/{project_number}/locations/{location}`.
|
348
|
+
#
|
349
|
+
# Valid locations:
|
350
|
+
#
|
351
|
+
# * `-` (Video Stitcher API will pick a location that is closest to the
|
352
|
+
# caller.)
|
353
|
+
# * `us-east1`
|
354
|
+
# * `us-west1`
|
355
|
+
# * `us-central1`
|
356
|
+
# * `europe-west1`
|
357
|
+
# @!attribute [rw] live_session
|
358
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::LiveSession]
|
359
|
+
# Required. Parameters for creating a live session.
|
360
|
+
class CreateLiveSessionRequest
|
361
|
+
include ::Google::Protobuf::MessageExts
|
362
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
363
|
+
end
|
364
|
+
|
365
|
+
# Request message for VideoStitcherService.getSession.
|
366
|
+
# @!attribute [rw] name
|
367
|
+
# @return [::String]
|
368
|
+
# Required. The name of the live session, in the form of
|
369
|
+
# `projects/{project_number}/locations/{location}/liveSessions/{id}`.
|
370
|
+
class GetLiveSessionRequest
|
371
|
+
include ::Google::Protobuf::MessageExts
|
372
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
373
|
+
end
|
374
|
+
end
|
375
|
+
end
|
376
|
+
end
|
377
|
+
end
|
378
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# A Duration represents a signed, fixed-length span of time represented
|
23
|
+
# as a count of seconds and fractions of seconds at nanosecond
|
24
|
+
# resolution. It is independent of any calendar and concepts like "day"
|
25
|
+
# or "month". It is related to Timestamp in that the difference between
|
26
|
+
# two Timestamp values is a Duration and it can be added or subtracted
|
27
|
+
# from a Timestamp. Range is approximately +-10,000 years.
|
28
|
+
#
|
29
|
+
# # Examples
|
30
|
+
#
|
31
|
+
# Example 1: Compute Duration from two Timestamps in pseudo code.
|
32
|
+
#
|
33
|
+
# Timestamp start = ...;
|
34
|
+
# Timestamp end = ...;
|
35
|
+
# Duration duration = ...;
|
36
|
+
#
|
37
|
+
# duration.seconds = end.seconds - start.seconds;
|
38
|
+
# duration.nanos = end.nanos - start.nanos;
|
39
|
+
#
|
40
|
+
# if (duration.seconds < 0 && duration.nanos > 0) {
|
41
|
+
# duration.seconds += 1;
|
42
|
+
# duration.nanos -= 1000000000;
|
43
|
+
# } else if (duration.seconds > 0 && duration.nanos < 0) {
|
44
|
+
# duration.seconds -= 1;
|
45
|
+
# duration.nanos += 1000000000;
|
46
|
+
# }
|
47
|
+
#
|
48
|
+
# Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
|
49
|
+
#
|
50
|
+
# Timestamp start = ...;
|
51
|
+
# Duration duration = ...;
|
52
|
+
# Timestamp end = ...;
|
53
|
+
#
|
54
|
+
# end.seconds = start.seconds + duration.seconds;
|
55
|
+
# end.nanos = start.nanos + duration.nanos;
|
56
|
+
#
|
57
|
+
# if (end.nanos < 0) {
|
58
|
+
# end.seconds -= 1;
|
59
|
+
# end.nanos += 1000000000;
|
60
|
+
# } else if (end.nanos >= 1000000000) {
|
61
|
+
# end.seconds += 1;
|
62
|
+
# end.nanos -= 1000000000;
|
63
|
+
# }
|
64
|
+
#
|
65
|
+
# Example 3: Compute Duration from datetime.timedelta in Python.
|
66
|
+
#
|
67
|
+
# td = datetime.timedelta(days=3, minutes=10)
|
68
|
+
# duration = Duration()
|
69
|
+
# duration.FromTimedelta(td)
|
70
|
+
#
|
71
|
+
# # JSON Mapping
|
72
|
+
#
|
73
|
+
# In JSON format, the Duration type is encoded as a string rather than an
|
74
|
+
# object, where the string ends in the suffix "s" (indicating seconds) and
|
75
|
+
# is preceded by the number of seconds, with nanoseconds expressed as
|
76
|
+
# fractional seconds. For example, 3 seconds with 0 nanoseconds should be
|
77
|
+
# encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
|
78
|
+
# be expressed in JSON format as "3.000000001s", and 3 seconds and 1
|
79
|
+
# microsecond should be expressed in JSON format as "3.000001s".
|
80
|
+
# @!attribute [rw] seconds
|
81
|
+
# @return [::Integer]
|
82
|
+
# Signed seconds of the span of time. Must be from -315,576,000,000
|
83
|
+
# to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
84
|
+
# 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
85
|
+
# @!attribute [rw] nanos
|
86
|
+
# @return [::Integer]
|
87
|
+
# Signed fractions of a second at nanosecond resolution of the span
|
88
|
+
# of time. Durations less than one second are represented with a 0
|
89
|
+
# `seconds` field and a positive or negative `nanos` field. For durations
|
90
|
+
# of one second or more, a non-zero value for the `nanos` field must be
|
91
|
+
# of the same sign as the `seconds` field. Must be from -999,999,999
|
92
|
+
# to +999,999,999 inclusive.
|
93
|
+
class Duration
|
94
|
+
include ::Google::Protobuf::MessageExts
|
95
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# A generic empty message that you can re-use to avoid defining duplicated
|
23
|
+
# empty messages in your APIs. A typical example is to use it as the request
|
24
|
+
# or the response type of an API method. For instance:
|
25
|
+
#
|
26
|
+
# service Foo {
|
27
|
+
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
28
|
+
# }
|
29
|
+
#
|
30
|
+
# The JSON representation for `Empty` is empty JSON object `{}`.
|
31
|
+
class Empty
|
32
|
+
include ::Google::Protobuf::MessageExts
|
33
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|