google_cloud_video_stitcher_v1/model.rs
1// Copyright 2025 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// https://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// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gaxi;
23extern crate google_cloud_gax;
24extern crate google_cloud_longrunning;
25extern crate google_cloud_lro;
26extern crate serde;
27extern crate serde_json;
28extern crate serde_with;
29extern crate std;
30extern crate tracing;
31extern crate wkt;
32
33mod debug;
34mod deserialize;
35mod serialize;
36
37/// Information related to the details for one ad tag. This resource is only
38/// available for live sessions that do not implement Google Ad Manager ad
39/// insertion.
40#[derive(Clone, Default, PartialEq)]
41#[non_exhaustive]
42pub struct LiveAdTagDetail {
43 /// The resource name in the form of
44 /// `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`.
45 pub name: std::string::String,
46
47 /// A list of ad requests.
48 pub ad_requests: std::vec::Vec<crate::model::AdRequest>,
49
50 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51}
52
53impl LiveAdTagDetail {
54 /// Creates a new default instance.
55 pub fn new() -> Self {
56 std::default::Default::default()
57 }
58
59 /// Sets the value of [name][crate::model::LiveAdTagDetail::name].
60 ///
61 /// # Example
62 /// ```ignore,no_run
63 /// # use google_cloud_video_stitcher_v1::model::LiveAdTagDetail;
64 /// # let project_id = "project_id";
65 /// # let location_id = "location_id";
66 /// # let live_session_id = "live_session_id";
67 /// # let live_ad_tag_detail_id = "live_ad_tag_detail_id";
68 /// let x = LiveAdTagDetail::new().set_name(format!("projects/{project_id}/locations/{location_id}/liveSessions/{live_session_id}/liveAdTagDetails/{live_ad_tag_detail_id}"));
69 /// ```
70 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
71 self.name = v.into();
72 self
73 }
74
75 /// Sets the value of [ad_requests][crate::model::LiveAdTagDetail::ad_requests].
76 ///
77 /// # Example
78 /// ```ignore,no_run
79 /// # use google_cloud_video_stitcher_v1::model::LiveAdTagDetail;
80 /// use google_cloud_video_stitcher_v1::model::AdRequest;
81 /// let x = LiveAdTagDetail::new()
82 /// .set_ad_requests([
83 /// AdRequest::default()/* use setters */,
84 /// AdRequest::default()/* use (different) setters */,
85 /// ]);
86 /// ```
87 pub fn set_ad_requests<T, V>(mut self, v: T) -> Self
88 where
89 T: std::iter::IntoIterator<Item = V>,
90 V: std::convert::Into<crate::model::AdRequest>,
91 {
92 use std::iter::Iterator;
93 self.ad_requests = v.into_iter().map(|i| i.into()).collect();
94 self
95 }
96}
97
98impl wkt::message::Message for LiveAdTagDetail {
99 fn typename() -> &'static str {
100 "type.googleapis.com/google.cloud.video.stitcher.v1.LiveAdTagDetail"
101 }
102}
103
104/// Information related to the details for one ad tag. This resource is only
105/// available for VOD sessions that do not implement Google Ad Manager ad
106/// insertion.
107#[derive(Clone, Default, PartialEq)]
108#[non_exhaustive]
109pub struct VodAdTagDetail {
110 /// The name of the ad tag detail for the specified VOD session, in the form of
111 /// `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`.
112 pub name: std::string::String,
113
114 /// A list of ad requests for one ad tag.
115 pub ad_requests: std::vec::Vec<crate::model::AdRequest>,
116
117 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
118}
119
120impl VodAdTagDetail {
121 /// Creates a new default instance.
122 pub fn new() -> Self {
123 std::default::Default::default()
124 }
125
126 /// Sets the value of [name][crate::model::VodAdTagDetail::name].
127 ///
128 /// # Example
129 /// ```ignore,no_run
130 /// # use google_cloud_video_stitcher_v1::model::VodAdTagDetail;
131 /// # let project_id = "project_id";
132 /// # let location_id = "location_id";
133 /// # let vod_session_id = "vod_session_id";
134 /// # let vod_ad_tag_detail_id = "vod_ad_tag_detail_id";
135 /// let x = VodAdTagDetail::new().set_name(format!("projects/{project_id}/locations/{location_id}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail_id}"));
136 /// ```
137 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
138 self.name = v.into();
139 self
140 }
141
142 /// Sets the value of [ad_requests][crate::model::VodAdTagDetail::ad_requests].
143 ///
144 /// # Example
145 /// ```ignore,no_run
146 /// # use google_cloud_video_stitcher_v1::model::VodAdTagDetail;
147 /// use google_cloud_video_stitcher_v1::model::AdRequest;
148 /// let x = VodAdTagDetail::new()
149 /// .set_ad_requests([
150 /// AdRequest::default()/* use setters */,
151 /// AdRequest::default()/* use (different) setters */,
152 /// ]);
153 /// ```
154 pub fn set_ad_requests<T, V>(mut self, v: T) -> Self
155 where
156 T: std::iter::IntoIterator<Item = V>,
157 V: std::convert::Into<crate::model::AdRequest>,
158 {
159 use std::iter::Iterator;
160 self.ad_requests = v.into_iter().map(|i| i.into()).collect();
161 self
162 }
163}
164
165impl wkt::message::Message for VodAdTagDetail {
166 fn typename() -> &'static str {
167 "type.googleapis.com/google.cloud.video.stitcher.v1.VodAdTagDetail"
168 }
169}
170
171/// Details of an ad request to an ad server.
172#[derive(Clone, Default, PartialEq)]
173#[non_exhaustive]
174pub struct AdRequest {
175 /// The ad tag URI processed with integrated macros.
176 pub uri: std::string::String,
177
178 /// The request metadata used to make the ad request.
179 pub request_metadata: std::option::Option<crate::model::RequestMetadata>,
180
181 /// The response metadata received from the ad request.
182 pub response_metadata: std::option::Option<crate::model::ResponseMetadata>,
183
184 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
185}
186
187impl AdRequest {
188 /// Creates a new default instance.
189 pub fn new() -> Self {
190 std::default::Default::default()
191 }
192
193 /// Sets the value of [uri][crate::model::AdRequest::uri].
194 ///
195 /// # Example
196 /// ```ignore,no_run
197 /// # use google_cloud_video_stitcher_v1::model::AdRequest;
198 /// let x = AdRequest::new().set_uri("example");
199 /// ```
200 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
201 self.uri = v.into();
202 self
203 }
204
205 /// Sets the value of [request_metadata][crate::model::AdRequest::request_metadata].
206 ///
207 /// # Example
208 /// ```ignore,no_run
209 /// # use google_cloud_video_stitcher_v1::model::AdRequest;
210 /// use google_cloud_video_stitcher_v1::model::RequestMetadata;
211 /// let x = AdRequest::new().set_request_metadata(RequestMetadata::default()/* use setters */);
212 /// ```
213 pub fn set_request_metadata<T>(mut self, v: T) -> Self
214 where
215 T: std::convert::Into<crate::model::RequestMetadata>,
216 {
217 self.request_metadata = std::option::Option::Some(v.into());
218 self
219 }
220
221 /// Sets or clears the value of [request_metadata][crate::model::AdRequest::request_metadata].
222 ///
223 /// # Example
224 /// ```ignore,no_run
225 /// # use google_cloud_video_stitcher_v1::model::AdRequest;
226 /// use google_cloud_video_stitcher_v1::model::RequestMetadata;
227 /// let x = AdRequest::new().set_or_clear_request_metadata(Some(RequestMetadata::default()/* use setters */));
228 /// let x = AdRequest::new().set_or_clear_request_metadata(None::<RequestMetadata>);
229 /// ```
230 pub fn set_or_clear_request_metadata<T>(mut self, v: std::option::Option<T>) -> Self
231 where
232 T: std::convert::Into<crate::model::RequestMetadata>,
233 {
234 self.request_metadata = v.map(|x| x.into());
235 self
236 }
237
238 /// Sets the value of [response_metadata][crate::model::AdRequest::response_metadata].
239 ///
240 /// # Example
241 /// ```ignore,no_run
242 /// # use google_cloud_video_stitcher_v1::model::AdRequest;
243 /// use google_cloud_video_stitcher_v1::model::ResponseMetadata;
244 /// let x = AdRequest::new().set_response_metadata(ResponseMetadata::default()/* use setters */);
245 /// ```
246 pub fn set_response_metadata<T>(mut self, v: T) -> Self
247 where
248 T: std::convert::Into<crate::model::ResponseMetadata>,
249 {
250 self.response_metadata = std::option::Option::Some(v.into());
251 self
252 }
253
254 /// Sets or clears the value of [response_metadata][crate::model::AdRequest::response_metadata].
255 ///
256 /// # Example
257 /// ```ignore,no_run
258 /// # use google_cloud_video_stitcher_v1::model::AdRequest;
259 /// use google_cloud_video_stitcher_v1::model::ResponseMetadata;
260 /// let x = AdRequest::new().set_or_clear_response_metadata(Some(ResponseMetadata::default()/* use setters */));
261 /// let x = AdRequest::new().set_or_clear_response_metadata(None::<ResponseMetadata>);
262 /// ```
263 pub fn set_or_clear_response_metadata<T>(mut self, v: std::option::Option<T>) -> Self
264 where
265 T: std::convert::Into<crate::model::ResponseMetadata>,
266 {
267 self.response_metadata = v.map(|x| x.into());
268 self
269 }
270}
271
272impl wkt::message::Message for AdRequest {
273 fn typename() -> &'static str {
274 "type.googleapis.com/google.cloud.video.stitcher.v1.AdRequest"
275 }
276}
277
278/// Metadata for an ad request.
279#[derive(Clone, Default, PartialEq)]
280#[non_exhaustive]
281pub struct RequestMetadata {
282 /// The HTTP headers of the ad request.
283 pub headers: std::option::Option<wkt::Struct>,
284
285 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
286}
287
288impl RequestMetadata {
289 /// Creates a new default instance.
290 pub fn new() -> Self {
291 std::default::Default::default()
292 }
293
294 /// Sets the value of [headers][crate::model::RequestMetadata::headers].
295 ///
296 /// # Example
297 /// ```ignore,no_run
298 /// # use google_cloud_video_stitcher_v1::model::RequestMetadata;
299 /// use wkt::Struct;
300 /// let x = RequestMetadata::new().set_headers(Struct::default()/* use setters */);
301 /// ```
302 pub fn set_headers<T>(mut self, v: T) -> Self
303 where
304 T: std::convert::Into<wkt::Struct>,
305 {
306 self.headers = std::option::Option::Some(v.into());
307 self
308 }
309
310 /// Sets or clears the value of [headers][crate::model::RequestMetadata::headers].
311 ///
312 /// # Example
313 /// ```ignore,no_run
314 /// # use google_cloud_video_stitcher_v1::model::RequestMetadata;
315 /// use wkt::Struct;
316 /// let x = RequestMetadata::new().set_or_clear_headers(Some(Struct::default()/* use setters */));
317 /// let x = RequestMetadata::new().set_or_clear_headers(None::<Struct>);
318 /// ```
319 pub fn set_or_clear_headers<T>(mut self, v: std::option::Option<T>) -> Self
320 where
321 T: std::convert::Into<wkt::Struct>,
322 {
323 self.headers = v.map(|x| x.into());
324 self
325 }
326}
327
328impl wkt::message::Message for RequestMetadata {
329 fn typename() -> &'static str {
330 "type.googleapis.com/google.cloud.video.stitcher.v1.RequestMetadata"
331 }
332}
333
334/// Metadata for the response of an ad request.
335#[derive(Clone, Default, PartialEq)]
336#[non_exhaustive]
337pub struct ResponseMetadata {
338 /// Error message received when making the ad request.
339 pub error: std::string::String,
340
341 /// Headers from the response.
342 pub headers: std::option::Option<wkt::Struct>,
343
344 /// Status code for the response.
345 pub status_code: std::string::String,
346
347 /// Size in bytes of the response.
348 pub size_bytes: i32,
349
350 /// Total time elapsed for the response.
351 pub duration: std::option::Option<wkt::Duration>,
352
353 /// The body of the response.
354 pub body: std::string::String,
355
356 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
357}
358
359impl ResponseMetadata {
360 /// Creates a new default instance.
361 pub fn new() -> Self {
362 std::default::Default::default()
363 }
364
365 /// Sets the value of [error][crate::model::ResponseMetadata::error].
366 ///
367 /// # Example
368 /// ```ignore,no_run
369 /// # use google_cloud_video_stitcher_v1::model::ResponseMetadata;
370 /// let x = ResponseMetadata::new().set_error("example");
371 /// ```
372 pub fn set_error<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
373 self.error = v.into();
374 self
375 }
376
377 /// Sets the value of [headers][crate::model::ResponseMetadata::headers].
378 ///
379 /// # Example
380 /// ```ignore,no_run
381 /// # use google_cloud_video_stitcher_v1::model::ResponseMetadata;
382 /// use wkt::Struct;
383 /// let x = ResponseMetadata::new().set_headers(Struct::default()/* use setters */);
384 /// ```
385 pub fn set_headers<T>(mut self, v: T) -> Self
386 where
387 T: std::convert::Into<wkt::Struct>,
388 {
389 self.headers = std::option::Option::Some(v.into());
390 self
391 }
392
393 /// Sets or clears the value of [headers][crate::model::ResponseMetadata::headers].
394 ///
395 /// # Example
396 /// ```ignore,no_run
397 /// # use google_cloud_video_stitcher_v1::model::ResponseMetadata;
398 /// use wkt::Struct;
399 /// let x = ResponseMetadata::new().set_or_clear_headers(Some(Struct::default()/* use setters */));
400 /// let x = ResponseMetadata::new().set_or_clear_headers(None::<Struct>);
401 /// ```
402 pub fn set_or_clear_headers<T>(mut self, v: std::option::Option<T>) -> Self
403 where
404 T: std::convert::Into<wkt::Struct>,
405 {
406 self.headers = v.map(|x| x.into());
407 self
408 }
409
410 /// Sets the value of [status_code][crate::model::ResponseMetadata::status_code].
411 ///
412 /// # Example
413 /// ```ignore,no_run
414 /// # use google_cloud_video_stitcher_v1::model::ResponseMetadata;
415 /// let x = ResponseMetadata::new().set_status_code("example");
416 /// ```
417 pub fn set_status_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
418 self.status_code = v.into();
419 self
420 }
421
422 /// Sets the value of [size_bytes][crate::model::ResponseMetadata::size_bytes].
423 ///
424 /// # Example
425 /// ```ignore,no_run
426 /// # use google_cloud_video_stitcher_v1::model::ResponseMetadata;
427 /// let x = ResponseMetadata::new().set_size_bytes(42);
428 /// ```
429 pub fn set_size_bytes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
430 self.size_bytes = v.into();
431 self
432 }
433
434 /// Sets the value of [duration][crate::model::ResponseMetadata::duration].
435 ///
436 /// # Example
437 /// ```ignore,no_run
438 /// # use google_cloud_video_stitcher_v1::model::ResponseMetadata;
439 /// use wkt::Duration;
440 /// let x = ResponseMetadata::new().set_duration(Duration::default()/* use setters */);
441 /// ```
442 pub fn set_duration<T>(mut self, v: T) -> Self
443 where
444 T: std::convert::Into<wkt::Duration>,
445 {
446 self.duration = std::option::Option::Some(v.into());
447 self
448 }
449
450 /// Sets or clears the value of [duration][crate::model::ResponseMetadata::duration].
451 ///
452 /// # Example
453 /// ```ignore,no_run
454 /// # use google_cloud_video_stitcher_v1::model::ResponseMetadata;
455 /// use wkt::Duration;
456 /// let x = ResponseMetadata::new().set_or_clear_duration(Some(Duration::default()/* use setters */));
457 /// let x = ResponseMetadata::new().set_or_clear_duration(None::<Duration>);
458 /// ```
459 pub fn set_or_clear_duration<T>(mut self, v: std::option::Option<T>) -> Self
460 where
461 T: std::convert::Into<wkt::Duration>,
462 {
463 self.duration = v.map(|x| x.into());
464 self
465 }
466
467 /// Sets the value of [body][crate::model::ResponseMetadata::body].
468 ///
469 /// # Example
470 /// ```ignore,no_run
471 /// # use google_cloud_video_stitcher_v1::model::ResponseMetadata;
472 /// let x = ResponseMetadata::new().set_body("example");
473 /// ```
474 pub fn set_body<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
475 self.body = v.into();
476 self
477 }
478}
479
480impl wkt::message::Message for ResponseMetadata {
481 fn typename() -> &'static str {
482 "type.googleapis.com/google.cloud.video.stitcher.v1.ResponseMetadata"
483 }
484}
485
486/// Configuration for a CDN key. Used by the Video Stitcher
487/// to sign URIs for fetching video manifests and signing
488/// media segments for playback.
489#[derive(Clone, Default, PartialEq)]
490#[non_exhaustive]
491pub struct CdnKey {
492 /// The resource name of the CDN key, in the form of
493 /// `projects/{project}/locations/{location}/cdnKeys/{id}`.
494 /// The name is ignored when creating a CDN key.
495 pub name: std::string::String,
496
497 /// The hostname this key applies to.
498 pub hostname: std::string::String,
499
500 /// Configuration associated with the CDN key.
501 pub cdn_key_config: std::option::Option<crate::model::cdn_key::CdnKeyConfig>,
502
503 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
504}
505
506impl CdnKey {
507 /// Creates a new default instance.
508 pub fn new() -> Self {
509 std::default::Default::default()
510 }
511
512 /// Sets the value of [name][crate::model::CdnKey::name].
513 ///
514 /// # Example
515 /// ```ignore,no_run
516 /// # use google_cloud_video_stitcher_v1::model::CdnKey;
517 /// # let project_id = "project_id";
518 /// # let location_id = "location_id";
519 /// # let cdn_key_id = "cdn_key_id";
520 /// let x = CdnKey::new().set_name(format!("projects/{project_id}/locations/{location_id}/cdnKeys/{cdn_key_id}"));
521 /// ```
522 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
523 self.name = v.into();
524 self
525 }
526
527 /// Sets the value of [hostname][crate::model::CdnKey::hostname].
528 ///
529 /// # Example
530 /// ```ignore,no_run
531 /// # use google_cloud_video_stitcher_v1::model::CdnKey;
532 /// let x = CdnKey::new().set_hostname("example");
533 /// ```
534 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
535 self.hostname = v.into();
536 self
537 }
538
539 /// Sets the value of [cdn_key_config][crate::model::CdnKey::cdn_key_config].
540 ///
541 /// Note that all the setters affecting `cdn_key_config` are mutually
542 /// exclusive.
543 ///
544 /// # Example
545 /// ```ignore,no_run
546 /// # use google_cloud_video_stitcher_v1::model::CdnKey;
547 /// use google_cloud_video_stitcher_v1::model::GoogleCdnKey;
548 /// let x = CdnKey::new().set_cdn_key_config(Some(
549 /// google_cloud_video_stitcher_v1::model::cdn_key::CdnKeyConfig::GoogleCdnKey(GoogleCdnKey::default().into())));
550 /// ```
551 pub fn set_cdn_key_config<
552 T: std::convert::Into<std::option::Option<crate::model::cdn_key::CdnKeyConfig>>,
553 >(
554 mut self,
555 v: T,
556 ) -> Self {
557 self.cdn_key_config = v.into();
558 self
559 }
560
561 /// The value of [cdn_key_config][crate::model::CdnKey::cdn_key_config]
562 /// if it holds a `GoogleCdnKey`, `None` if the field is not set or
563 /// holds a different branch.
564 pub fn google_cdn_key(
565 &self,
566 ) -> std::option::Option<&std::boxed::Box<crate::model::GoogleCdnKey>> {
567 #[allow(unreachable_patterns)]
568 self.cdn_key_config.as_ref().and_then(|v| match v {
569 crate::model::cdn_key::CdnKeyConfig::GoogleCdnKey(v) => std::option::Option::Some(v),
570 _ => std::option::Option::None,
571 })
572 }
573
574 /// Sets the value of [cdn_key_config][crate::model::CdnKey::cdn_key_config]
575 /// to hold a `GoogleCdnKey`.
576 ///
577 /// Note that all the setters affecting `cdn_key_config` are
578 /// mutually exclusive.
579 ///
580 /// # Example
581 /// ```ignore,no_run
582 /// # use google_cloud_video_stitcher_v1::model::CdnKey;
583 /// use google_cloud_video_stitcher_v1::model::GoogleCdnKey;
584 /// let x = CdnKey::new().set_google_cdn_key(GoogleCdnKey::default()/* use setters */);
585 /// assert!(x.google_cdn_key().is_some());
586 /// assert!(x.akamai_cdn_key().is_none());
587 /// assert!(x.media_cdn_key().is_none());
588 /// ```
589 pub fn set_google_cdn_key<
590 T: std::convert::Into<std::boxed::Box<crate::model::GoogleCdnKey>>,
591 >(
592 mut self,
593 v: T,
594 ) -> Self {
595 self.cdn_key_config =
596 std::option::Option::Some(crate::model::cdn_key::CdnKeyConfig::GoogleCdnKey(v.into()));
597 self
598 }
599
600 /// The value of [cdn_key_config][crate::model::CdnKey::cdn_key_config]
601 /// if it holds a `AkamaiCdnKey`, `None` if the field is not set or
602 /// holds a different branch.
603 pub fn akamai_cdn_key(
604 &self,
605 ) -> std::option::Option<&std::boxed::Box<crate::model::AkamaiCdnKey>> {
606 #[allow(unreachable_patterns)]
607 self.cdn_key_config.as_ref().and_then(|v| match v {
608 crate::model::cdn_key::CdnKeyConfig::AkamaiCdnKey(v) => std::option::Option::Some(v),
609 _ => std::option::Option::None,
610 })
611 }
612
613 /// Sets the value of [cdn_key_config][crate::model::CdnKey::cdn_key_config]
614 /// to hold a `AkamaiCdnKey`.
615 ///
616 /// Note that all the setters affecting `cdn_key_config` are
617 /// mutually exclusive.
618 ///
619 /// # Example
620 /// ```ignore,no_run
621 /// # use google_cloud_video_stitcher_v1::model::CdnKey;
622 /// use google_cloud_video_stitcher_v1::model::AkamaiCdnKey;
623 /// let x = CdnKey::new().set_akamai_cdn_key(AkamaiCdnKey::default()/* use setters */);
624 /// assert!(x.akamai_cdn_key().is_some());
625 /// assert!(x.google_cdn_key().is_none());
626 /// assert!(x.media_cdn_key().is_none());
627 /// ```
628 pub fn set_akamai_cdn_key<
629 T: std::convert::Into<std::boxed::Box<crate::model::AkamaiCdnKey>>,
630 >(
631 mut self,
632 v: T,
633 ) -> Self {
634 self.cdn_key_config =
635 std::option::Option::Some(crate::model::cdn_key::CdnKeyConfig::AkamaiCdnKey(v.into()));
636 self
637 }
638
639 /// The value of [cdn_key_config][crate::model::CdnKey::cdn_key_config]
640 /// if it holds a `MediaCdnKey`, `None` if the field is not set or
641 /// holds a different branch.
642 pub fn media_cdn_key(
643 &self,
644 ) -> std::option::Option<&std::boxed::Box<crate::model::MediaCdnKey>> {
645 #[allow(unreachable_patterns)]
646 self.cdn_key_config.as_ref().and_then(|v| match v {
647 crate::model::cdn_key::CdnKeyConfig::MediaCdnKey(v) => std::option::Option::Some(v),
648 _ => std::option::Option::None,
649 })
650 }
651
652 /// Sets the value of [cdn_key_config][crate::model::CdnKey::cdn_key_config]
653 /// to hold a `MediaCdnKey`.
654 ///
655 /// Note that all the setters affecting `cdn_key_config` are
656 /// mutually exclusive.
657 ///
658 /// # Example
659 /// ```ignore,no_run
660 /// # use google_cloud_video_stitcher_v1::model::CdnKey;
661 /// use google_cloud_video_stitcher_v1::model::MediaCdnKey;
662 /// let x = CdnKey::new().set_media_cdn_key(MediaCdnKey::default()/* use setters */);
663 /// assert!(x.media_cdn_key().is_some());
664 /// assert!(x.google_cdn_key().is_none());
665 /// assert!(x.akamai_cdn_key().is_none());
666 /// ```
667 pub fn set_media_cdn_key<T: std::convert::Into<std::boxed::Box<crate::model::MediaCdnKey>>>(
668 mut self,
669 v: T,
670 ) -> Self {
671 self.cdn_key_config =
672 std::option::Option::Some(crate::model::cdn_key::CdnKeyConfig::MediaCdnKey(v.into()));
673 self
674 }
675}
676
677impl wkt::message::Message for CdnKey {
678 fn typename() -> &'static str {
679 "type.googleapis.com/google.cloud.video.stitcher.v1.CdnKey"
680 }
681}
682
683/// Defines additional types related to [CdnKey].
684pub mod cdn_key {
685 #[allow(unused_imports)]
686 use super::*;
687
688 /// Configuration associated with the CDN key.
689 #[derive(Clone, Debug, PartialEq)]
690 #[non_exhaustive]
691 pub enum CdnKeyConfig {
692 /// The configuration for a Google Cloud CDN key.
693 GoogleCdnKey(std::boxed::Box<crate::model::GoogleCdnKey>),
694 /// The configuration for an Akamai CDN key.
695 AkamaiCdnKey(std::boxed::Box<crate::model::AkamaiCdnKey>),
696 /// The configuration for a Media CDN key.
697 MediaCdnKey(std::boxed::Box<crate::model::MediaCdnKey>),
698 }
699}
700
701/// Configuration for a Google Cloud CDN key.
702#[derive(Clone, Default, PartialEq)]
703#[non_exhaustive]
704pub struct GoogleCdnKey {
705 /// Input only. Secret for this Google Cloud CDN key.
706 pub private_key: ::bytes::Bytes,
707
708 /// The public name of the Google Cloud CDN key.
709 pub key_name: std::string::String,
710
711 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
712}
713
714impl GoogleCdnKey {
715 /// Creates a new default instance.
716 pub fn new() -> Self {
717 std::default::Default::default()
718 }
719
720 /// Sets the value of [private_key][crate::model::GoogleCdnKey::private_key].
721 ///
722 /// # Example
723 /// ```ignore,no_run
724 /// # use google_cloud_video_stitcher_v1::model::GoogleCdnKey;
725 /// let x = GoogleCdnKey::new().set_private_key(bytes::Bytes::from_static(b"example"));
726 /// ```
727 pub fn set_private_key<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
728 self.private_key = v.into();
729 self
730 }
731
732 /// Sets the value of [key_name][crate::model::GoogleCdnKey::key_name].
733 ///
734 /// # Example
735 /// ```ignore,no_run
736 /// # use google_cloud_video_stitcher_v1::model::GoogleCdnKey;
737 /// let x = GoogleCdnKey::new().set_key_name("example");
738 /// ```
739 pub fn set_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
740 self.key_name = v.into();
741 self
742 }
743}
744
745impl wkt::message::Message for GoogleCdnKey {
746 fn typename() -> &'static str {
747 "type.googleapis.com/google.cloud.video.stitcher.v1.GoogleCdnKey"
748 }
749}
750
751/// Configuration for an Akamai CDN key.
752#[derive(Clone, Default, PartialEq)]
753#[non_exhaustive]
754pub struct AkamaiCdnKey {
755 /// Input only. Token key for the Akamai CDN edge configuration.
756 pub token_key: ::bytes::Bytes,
757
758 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
759}
760
761impl AkamaiCdnKey {
762 /// Creates a new default instance.
763 pub fn new() -> Self {
764 std::default::Default::default()
765 }
766
767 /// Sets the value of [token_key][crate::model::AkamaiCdnKey::token_key].
768 ///
769 /// # Example
770 /// ```ignore,no_run
771 /// # use google_cloud_video_stitcher_v1::model::AkamaiCdnKey;
772 /// let x = AkamaiCdnKey::new().set_token_key(bytes::Bytes::from_static(b"example"));
773 /// ```
774 pub fn set_token_key<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
775 self.token_key = v.into();
776 self
777 }
778}
779
780impl wkt::message::Message for AkamaiCdnKey {
781 fn typename() -> &'static str {
782 "type.googleapis.com/google.cloud.video.stitcher.v1.AkamaiCdnKey"
783 }
784}
785
786/// Configuration for a Media CDN key.
787#[derive(Clone, Default, PartialEq)]
788#[non_exhaustive]
789pub struct MediaCdnKey {
790 /// Input only. 64-byte ed25519 private key for this Media CDN key.
791 pub private_key: ::bytes::Bytes,
792
793 /// The keyset name of the Media CDN key.
794 pub key_name: std::string::String,
795
796 /// Optional. If set, the URL will be signed using the Media CDN token.
797 /// Otherwise, the URL would be signed using the standard Media CDN signature.
798 pub token_config: std::option::Option<crate::model::media_cdn_key::TokenConfig>,
799
800 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
801}
802
803impl MediaCdnKey {
804 /// Creates a new default instance.
805 pub fn new() -> Self {
806 std::default::Default::default()
807 }
808
809 /// Sets the value of [private_key][crate::model::MediaCdnKey::private_key].
810 ///
811 /// # Example
812 /// ```ignore,no_run
813 /// # use google_cloud_video_stitcher_v1::model::MediaCdnKey;
814 /// let x = MediaCdnKey::new().set_private_key(bytes::Bytes::from_static(b"example"));
815 /// ```
816 pub fn set_private_key<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
817 self.private_key = v.into();
818 self
819 }
820
821 /// Sets the value of [key_name][crate::model::MediaCdnKey::key_name].
822 ///
823 /// # Example
824 /// ```ignore,no_run
825 /// # use google_cloud_video_stitcher_v1::model::MediaCdnKey;
826 /// let x = MediaCdnKey::new().set_key_name("example");
827 /// ```
828 pub fn set_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
829 self.key_name = v.into();
830 self
831 }
832
833 /// Sets the value of [token_config][crate::model::MediaCdnKey::token_config].
834 ///
835 /// # Example
836 /// ```ignore,no_run
837 /// # use google_cloud_video_stitcher_v1::model::MediaCdnKey;
838 /// use google_cloud_video_stitcher_v1::model::media_cdn_key::TokenConfig;
839 /// let x = MediaCdnKey::new().set_token_config(TokenConfig::default()/* use setters */);
840 /// ```
841 pub fn set_token_config<T>(mut self, v: T) -> Self
842 where
843 T: std::convert::Into<crate::model::media_cdn_key::TokenConfig>,
844 {
845 self.token_config = std::option::Option::Some(v.into());
846 self
847 }
848
849 /// Sets or clears the value of [token_config][crate::model::MediaCdnKey::token_config].
850 ///
851 /// # Example
852 /// ```ignore,no_run
853 /// # use google_cloud_video_stitcher_v1::model::MediaCdnKey;
854 /// use google_cloud_video_stitcher_v1::model::media_cdn_key::TokenConfig;
855 /// let x = MediaCdnKey::new().set_or_clear_token_config(Some(TokenConfig::default()/* use setters */));
856 /// let x = MediaCdnKey::new().set_or_clear_token_config(None::<TokenConfig>);
857 /// ```
858 pub fn set_or_clear_token_config<T>(mut self, v: std::option::Option<T>) -> Self
859 where
860 T: std::convert::Into<crate::model::media_cdn_key::TokenConfig>,
861 {
862 self.token_config = v.map(|x| x.into());
863 self
864 }
865}
866
867impl wkt::message::Message for MediaCdnKey {
868 fn typename() -> &'static str {
869 "type.googleapis.com/google.cloud.video.stitcher.v1.MediaCdnKey"
870 }
871}
872
873/// Defines additional types related to [MediaCdnKey].
874pub mod media_cdn_key {
875 #[allow(unused_imports)]
876 use super::*;
877
878 /// Configuration for a Media CDN token.
879 #[derive(Clone, Default, PartialEq)]
880 #[non_exhaustive]
881 pub struct TokenConfig {
882 /// Optional. The query parameter in which to find the token.
883 ///
884 /// The name must be 1-64 characters long and match
885 /// the regular expression `[a-zA-Z]([a-zA-Z0-9_-])*` which means the
886 /// first character must be a letter, and all following characters
887 /// must be a dash, underscore, letter or digit.
888 ///
889 /// Defaults to `edge-cache-token`.
890 pub query_parameter: std::string::String,
891
892 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
893 }
894
895 impl TokenConfig {
896 /// Creates a new default instance.
897 pub fn new() -> Self {
898 std::default::Default::default()
899 }
900
901 /// Sets the value of [query_parameter][crate::model::media_cdn_key::TokenConfig::query_parameter].
902 ///
903 /// # Example
904 /// ```ignore,no_run
905 /// # use google_cloud_video_stitcher_v1::model::media_cdn_key::TokenConfig;
906 /// let x = TokenConfig::new().set_query_parameter("example");
907 /// ```
908 pub fn set_query_parameter<T: std::convert::Into<std::string::String>>(
909 mut self,
910 v: T,
911 ) -> Self {
912 self.query_parameter = v.into();
913 self
914 }
915 }
916
917 impl wkt::message::Message for TokenConfig {
918 fn typename() -> &'static str {
919 "type.googleapis.com/google.cloud.video.stitcher.v1.MediaCdnKey.TokenConfig"
920 }
921 }
922}
923
924/// Metadata for companion ads.
925#[derive(Clone, Default, PartialEq)]
926#[non_exhaustive]
927pub struct CompanionAds {
928 /// Indicates how many of the companions should be displayed with the ad.
929 pub display_requirement: crate::model::companion_ads::DisplayRequirement,
930
931 /// List of companion ads.
932 pub companions: std::vec::Vec<crate::model::Companion>,
933
934 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
935}
936
937impl CompanionAds {
938 /// Creates a new default instance.
939 pub fn new() -> Self {
940 std::default::Default::default()
941 }
942
943 /// Sets the value of [display_requirement][crate::model::CompanionAds::display_requirement].
944 ///
945 /// # Example
946 /// ```ignore,no_run
947 /// # use google_cloud_video_stitcher_v1::model::CompanionAds;
948 /// use google_cloud_video_stitcher_v1::model::companion_ads::DisplayRequirement;
949 /// let x0 = CompanionAds::new().set_display_requirement(DisplayRequirement::All);
950 /// let x1 = CompanionAds::new().set_display_requirement(DisplayRequirement::Any);
951 /// let x2 = CompanionAds::new().set_display_requirement(DisplayRequirement::None);
952 /// ```
953 pub fn set_display_requirement<
954 T: std::convert::Into<crate::model::companion_ads::DisplayRequirement>,
955 >(
956 mut self,
957 v: T,
958 ) -> Self {
959 self.display_requirement = v.into();
960 self
961 }
962
963 /// Sets the value of [companions][crate::model::CompanionAds::companions].
964 ///
965 /// # Example
966 /// ```ignore,no_run
967 /// # use google_cloud_video_stitcher_v1::model::CompanionAds;
968 /// use google_cloud_video_stitcher_v1::model::Companion;
969 /// let x = CompanionAds::new()
970 /// .set_companions([
971 /// Companion::default()/* use setters */,
972 /// Companion::default()/* use (different) setters */,
973 /// ]);
974 /// ```
975 pub fn set_companions<T, V>(mut self, v: T) -> Self
976 where
977 T: std::iter::IntoIterator<Item = V>,
978 V: std::convert::Into<crate::model::Companion>,
979 {
980 use std::iter::Iterator;
981 self.companions = v.into_iter().map(|i| i.into()).collect();
982 self
983 }
984}
985
986impl wkt::message::Message for CompanionAds {
987 fn typename() -> &'static str {
988 "type.googleapis.com/google.cloud.video.stitcher.v1.CompanionAds"
989 }
990}
991
992/// Defines additional types related to [CompanionAds].
993pub mod companion_ads {
994 #[allow(unused_imports)]
995 use super::*;
996
997 /// Indicates how many of the companions should be displayed with the ad.
998 ///
999 /// # Working with unknown values
1000 ///
1001 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1002 /// additional enum variants at any time. Adding new variants is not considered
1003 /// a breaking change. Applications should write their code in anticipation of:
1004 ///
1005 /// - New values appearing in future releases of the client library, **and**
1006 /// - New values received dynamically, without application changes.
1007 ///
1008 /// Please consult the [Working with enums] section in the user guide for some
1009 /// guidelines.
1010 ///
1011 /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1012 #[derive(Clone, Debug, PartialEq)]
1013 #[non_exhaustive]
1014 pub enum DisplayRequirement {
1015 /// Required companions are not specified. The default is ALL.
1016 Unspecified,
1017 /// All companions are required to be displayed.
1018 All,
1019 /// At least one of companions needs to be displayed.
1020 Any,
1021 /// All companions are optional for display.
1022 None,
1023 /// If set, the enum was initialized with an unknown value.
1024 ///
1025 /// Applications can examine the value using [DisplayRequirement::value] or
1026 /// [DisplayRequirement::name].
1027 UnknownValue(display_requirement::UnknownValue),
1028 }
1029
1030 #[doc(hidden)]
1031 pub mod display_requirement {
1032 #[allow(unused_imports)]
1033 use super::*;
1034 #[derive(Clone, Debug, PartialEq)]
1035 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1036 }
1037
1038 impl DisplayRequirement {
1039 /// Gets the enum value.
1040 ///
1041 /// Returns `None` if the enum contains an unknown value deserialized from
1042 /// the string representation of enums.
1043 pub fn value(&self) -> std::option::Option<i32> {
1044 match self {
1045 Self::Unspecified => std::option::Option::Some(0),
1046 Self::All => std::option::Option::Some(1),
1047 Self::Any => std::option::Option::Some(2),
1048 Self::None => std::option::Option::Some(3),
1049 Self::UnknownValue(u) => u.0.value(),
1050 }
1051 }
1052
1053 /// Gets the enum value as a string.
1054 ///
1055 /// Returns `None` if the enum contains an unknown value deserialized from
1056 /// the integer representation of enums.
1057 pub fn name(&self) -> std::option::Option<&str> {
1058 match self {
1059 Self::Unspecified => std::option::Option::Some("DISPLAY_REQUIREMENT_UNSPECIFIED"),
1060 Self::All => std::option::Option::Some("ALL"),
1061 Self::Any => std::option::Option::Some("ANY"),
1062 Self::None => std::option::Option::Some("NONE"),
1063 Self::UnknownValue(u) => u.0.name(),
1064 }
1065 }
1066 }
1067
1068 impl std::default::Default for DisplayRequirement {
1069 fn default() -> Self {
1070 use std::convert::From;
1071 Self::from(0)
1072 }
1073 }
1074
1075 impl std::fmt::Display for DisplayRequirement {
1076 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1077 wkt::internal::display_enum(f, self.name(), self.value())
1078 }
1079 }
1080
1081 impl std::convert::From<i32> for DisplayRequirement {
1082 fn from(value: i32) -> Self {
1083 match value {
1084 0 => Self::Unspecified,
1085 1 => Self::All,
1086 2 => Self::Any,
1087 3 => Self::None,
1088 _ => Self::UnknownValue(display_requirement::UnknownValue(
1089 wkt::internal::UnknownEnumValue::Integer(value),
1090 )),
1091 }
1092 }
1093 }
1094
1095 impl std::convert::From<&str> for DisplayRequirement {
1096 fn from(value: &str) -> Self {
1097 use std::string::ToString;
1098 match value {
1099 "DISPLAY_REQUIREMENT_UNSPECIFIED" => Self::Unspecified,
1100 "ALL" => Self::All,
1101 "ANY" => Self::Any,
1102 "NONE" => Self::None,
1103 _ => Self::UnknownValue(display_requirement::UnknownValue(
1104 wkt::internal::UnknownEnumValue::String(value.to_string()),
1105 )),
1106 }
1107 }
1108 }
1109
1110 impl serde::ser::Serialize for DisplayRequirement {
1111 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1112 where
1113 S: serde::Serializer,
1114 {
1115 match self {
1116 Self::Unspecified => serializer.serialize_i32(0),
1117 Self::All => serializer.serialize_i32(1),
1118 Self::Any => serializer.serialize_i32(2),
1119 Self::None => serializer.serialize_i32(3),
1120 Self::UnknownValue(u) => u.0.serialize(serializer),
1121 }
1122 }
1123 }
1124
1125 impl<'de> serde::de::Deserialize<'de> for DisplayRequirement {
1126 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1127 where
1128 D: serde::Deserializer<'de>,
1129 {
1130 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DisplayRequirement>::new(
1131 ".google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement",
1132 ))
1133 }
1134 }
1135}
1136
1137/// Metadata for a companion.
1138#[derive(Clone, Default, PartialEq)]
1139#[non_exhaustive]
1140pub struct Companion {
1141 /// The API necessary to communicate with the creative if available.
1142 pub api_framework: std::string::String,
1143
1144 /// The pixel height of the placement slot for the intended creative.
1145 pub height_px: i32,
1146
1147 /// The pixel width of the placement slot for the intended creative.
1148 pub width_px: i32,
1149
1150 /// The pixel height of the creative.
1151 pub asset_height_px: i32,
1152
1153 /// The maximum pixel height of the creative in its expanded state.
1154 pub expanded_height_px: i32,
1155
1156 /// The pixel width of the creative.
1157 pub asset_width_px: i32,
1158
1159 /// The maximum pixel width of the creative in its expanded state.
1160 pub expanded_width_px: i32,
1161
1162 /// The ID used to identify the desired placement on a publisher's page.
1163 /// Values to be used should be discussed between publishers and
1164 /// advertisers.
1165 pub ad_slot_id: std::string::String,
1166
1167 /// The list of tracking events for the companion.
1168 pub events: std::vec::Vec<crate::model::Event>,
1169
1170 /// Ad resource associated with the companion ad.
1171 pub ad_resource: std::option::Option<crate::model::companion::AdResource>,
1172
1173 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1174}
1175
1176impl Companion {
1177 /// Creates a new default instance.
1178 pub fn new() -> Self {
1179 std::default::Default::default()
1180 }
1181
1182 /// Sets the value of [api_framework][crate::model::Companion::api_framework].
1183 ///
1184 /// # Example
1185 /// ```ignore,no_run
1186 /// # use google_cloud_video_stitcher_v1::model::Companion;
1187 /// let x = Companion::new().set_api_framework("example");
1188 /// ```
1189 pub fn set_api_framework<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1190 self.api_framework = v.into();
1191 self
1192 }
1193
1194 /// Sets the value of [height_px][crate::model::Companion::height_px].
1195 ///
1196 /// # Example
1197 /// ```ignore,no_run
1198 /// # use google_cloud_video_stitcher_v1::model::Companion;
1199 /// let x = Companion::new().set_height_px(42);
1200 /// ```
1201 pub fn set_height_px<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1202 self.height_px = v.into();
1203 self
1204 }
1205
1206 /// Sets the value of [width_px][crate::model::Companion::width_px].
1207 ///
1208 /// # Example
1209 /// ```ignore,no_run
1210 /// # use google_cloud_video_stitcher_v1::model::Companion;
1211 /// let x = Companion::new().set_width_px(42);
1212 /// ```
1213 pub fn set_width_px<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1214 self.width_px = v.into();
1215 self
1216 }
1217
1218 /// Sets the value of [asset_height_px][crate::model::Companion::asset_height_px].
1219 ///
1220 /// # Example
1221 /// ```ignore,no_run
1222 /// # use google_cloud_video_stitcher_v1::model::Companion;
1223 /// let x = Companion::new().set_asset_height_px(42);
1224 /// ```
1225 pub fn set_asset_height_px<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1226 self.asset_height_px = v.into();
1227 self
1228 }
1229
1230 /// Sets the value of [expanded_height_px][crate::model::Companion::expanded_height_px].
1231 ///
1232 /// # Example
1233 /// ```ignore,no_run
1234 /// # use google_cloud_video_stitcher_v1::model::Companion;
1235 /// let x = Companion::new().set_expanded_height_px(42);
1236 /// ```
1237 pub fn set_expanded_height_px<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1238 self.expanded_height_px = v.into();
1239 self
1240 }
1241
1242 /// Sets the value of [asset_width_px][crate::model::Companion::asset_width_px].
1243 ///
1244 /// # Example
1245 /// ```ignore,no_run
1246 /// # use google_cloud_video_stitcher_v1::model::Companion;
1247 /// let x = Companion::new().set_asset_width_px(42);
1248 /// ```
1249 pub fn set_asset_width_px<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1250 self.asset_width_px = v.into();
1251 self
1252 }
1253
1254 /// Sets the value of [expanded_width_px][crate::model::Companion::expanded_width_px].
1255 ///
1256 /// # Example
1257 /// ```ignore,no_run
1258 /// # use google_cloud_video_stitcher_v1::model::Companion;
1259 /// let x = Companion::new().set_expanded_width_px(42);
1260 /// ```
1261 pub fn set_expanded_width_px<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1262 self.expanded_width_px = v.into();
1263 self
1264 }
1265
1266 /// Sets the value of [ad_slot_id][crate::model::Companion::ad_slot_id].
1267 ///
1268 /// # Example
1269 /// ```ignore,no_run
1270 /// # use google_cloud_video_stitcher_v1::model::Companion;
1271 /// let x = Companion::new().set_ad_slot_id("example");
1272 /// ```
1273 pub fn set_ad_slot_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1274 self.ad_slot_id = v.into();
1275 self
1276 }
1277
1278 /// Sets the value of [events][crate::model::Companion::events].
1279 ///
1280 /// # Example
1281 /// ```ignore,no_run
1282 /// # use google_cloud_video_stitcher_v1::model::Companion;
1283 /// use google_cloud_video_stitcher_v1::model::Event;
1284 /// let x = Companion::new()
1285 /// .set_events([
1286 /// Event::default()/* use setters */,
1287 /// Event::default()/* use (different) setters */,
1288 /// ]);
1289 /// ```
1290 pub fn set_events<T, V>(mut self, v: T) -> Self
1291 where
1292 T: std::iter::IntoIterator<Item = V>,
1293 V: std::convert::Into<crate::model::Event>,
1294 {
1295 use std::iter::Iterator;
1296 self.events = v.into_iter().map(|i| i.into()).collect();
1297 self
1298 }
1299
1300 /// Sets the value of [ad_resource][crate::model::Companion::ad_resource].
1301 ///
1302 /// Note that all the setters affecting `ad_resource` are mutually
1303 /// exclusive.
1304 ///
1305 /// # Example
1306 /// ```ignore,no_run
1307 /// # use google_cloud_video_stitcher_v1::model::Companion;
1308 /// use google_cloud_video_stitcher_v1::model::IframeAdResource;
1309 /// let x = Companion::new().set_ad_resource(Some(
1310 /// google_cloud_video_stitcher_v1::model::companion::AdResource::IframeAdResource(IframeAdResource::default().into())));
1311 /// ```
1312 pub fn set_ad_resource<
1313 T: std::convert::Into<std::option::Option<crate::model::companion::AdResource>>,
1314 >(
1315 mut self,
1316 v: T,
1317 ) -> Self {
1318 self.ad_resource = v.into();
1319 self
1320 }
1321
1322 /// The value of [ad_resource][crate::model::Companion::ad_resource]
1323 /// if it holds a `IframeAdResource`, `None` if the field is not set or
1324 /// holds a different branch.
1325 pub fn iframe_ad_resource(
1326 &self,
1327 ) -> std::option::Option<&std::boxed::Box<crate::model::IframeAdResource>> {
1328 #[allow(unreachable_patterns)]
1329 self.ad_resource.as_ref().and_then(|v| match v {
1330 crate::model::companion::AdResource::IframeAdResource(v) => {
1331 std::option::Option::Some(v)
1332 }
1333 _ => std::option::Option::None,
1334 })
1335 }
1336
1337 /// Sets the value of [ad_resource][crate::model::Companion::ad_resource]
1338 /// to hold a `IframeAdResource`.
1339 ///
1340 /// Note that all the setters affecting `ad_resource` are
1341 /// mutually exclusive.
1342 ///
1343 /// # Example
1344 /// ```ignore,no_run
1345 /// # use google_cloud_video_stitcher_v1::model::Companion;
1346 /// use google_cloud_video_stitcher_v1::model::IframeAdResource;
1347 /// let x = Companion::new().set_iframe_ad_resource(IframeAdResource::default()/* use setters */);
1348 /// assert!(x.iframe_ad_resource().is_some());
1349 /// assert!(x.static_ad_resource().is_none());
1350 /// assert!(x.html_ad_resource().is_none());
1351 /// ```
1352 pub fn set_iframe_ad_resource<
1353 T: std::convert::Into<std::boxed::Box<crate::model::IframeAdResource>>,
1354 >(
1355 mut self,
1356 v: T,
1357 ) -> Self {
1358 self.ad_resource = std::option::Option::Some(
1359 crate::model::companion::AdResource::IframeAdResource(v.into()),
1360 );
1361 self
1362 }
1363
1364 /// The value of [ad_resource][crate::model::Companion::ad_resource]
1365 /// if it holds a `StaticAdResource`, `None` if the field is not set or
1366 /// holds a different branch.
1367 pub fn static_ad_resource(
1368 &self,
1369 ) -> std::option::Option<&std::boxed::Box<crate::model::StaticAdResource>> {
1370 #[allow(unreachable_patterns)]
1371 self.ad_resource.as_ref().and_then(|v| match v {
1372 crate::model::companion::AdResource::StaticAdResource(v) => {
1373 std::option::Option::Some(v)
1374 }
1375 _ => std::option::Option::None,
1376 })
1377 }
1378
1379 /// Sets the value of [ad_resource][crate::model::Companion::ad_resource]
1380 /// to hold a `StaticAdResource`.
1381 ///
1382 /// Note that all the setters affecting `ad_resource` are
1383 /// mutually exclusive.
1384 ///
1385 /// # Example
1386 /// ```ignore,no_run
1387 /// # use google_cloud_video_stitcher_v1::model::Companion;
1388 /// use google_cloud_video_stitcher_v1::model::StaticAdResource;
1389 /// let x = Companion::new().set_static_ad_resource(StaticAdResource::default()/* use setters */);
1390 /// assert!(x.static_ad_resource().is_some());
1391 /// assert!(x.iframe_ad_resource().is_none());
1392 /// assert!(x.html_ad_resource().is_none());
1393 /// ```
1394 pub fn set_static_ad_resource<
1395 T: std::convert::Into<std::boxed::Box<crate::model::StaticAdResource>>,
1396 >(
1397 mut self,
1398 v: T,
1399 ) -> Self {
1400 self.ad_resource = std::option::Option::Some(
1401 crate::model::companion::AdResource::StaticAdResource(v.into()),
1402 );
1403 self
1404 }
1405
1406 /// The value of [ad_resource][crate::model::Companion::ad_resource]
1407 /// if it holds a `HtmlAdResource`, `None` if the field is not set or
1408 /// holds a different branch.
1409 pub fn html_ad_resource(
1410 &self,
1411 ) -> std::option::Option<&std::boxed::Box<crate::model::HtmlAdResource>> {
1412 #[allow(unreachable_patterns)]
1413 self.ad_resource.as_ref().and_then(|v| match v {
1414 crate::model::companion::AdResource::HtmlAdResource(v) => std::option::Option::Some(v),
1415 _ => std::option::Option::None,
1416 })
1417 }
1418
1419 /// Sets the value of [ad_resource][crate::model::Companion::ad_resource]
1420 /// to hold a `HtmlAdResource`.
1421 ///
1422 /// Note that all the setters affecting `ad_resource` are
1423 /// mutually exclusive.
1424 ///
1425 /// # Example
1426 /// ```ignore,no_run
1427 /// # use google_cloud_video_stitcher_v1::model::Companion;
1428 /// use google_cloud_video_stitcher_v1::model::HtmlAdResource;
1429 /// let x = Companion::new().set_html_ad_resource(HtmlAdResource::default()/* use setters */);
1430 /// assert!(x.html_ad_resource().is_some());
1431 /// assert!(x.iframe_ad_resource().is_none());
1432 /// assert!(x.static_ad_resource().is_none());
1433 /// ```
1434 pub fn set_html_ad_resource<
1435 T: std::convert::Into<std::boxed::Box<crate::model::HtmlAdResource>>,
1436 >(
1437 mut self,
1438 v: T,
1439 ) -> Self {
1440 self.ad_resource = std::option::Option::Some(
1441 crate::model::companion::AdResource::HtmlAdResource(v.into()),
1442 );
1443 self
1444 }
1445}
1446
1447impl wkt::message::Message for Companion {
1448 fn typename() -> &'static str {
1449 "type.googleapis.com/google.cloud.video.stitcher.v1.Companion"
1450 }
1451}
1452
1453/// Defines additional types related to [Companion].
1454pub mod companion {
1455 #[allow(unused_imports)]
1456 use super::*;
1457
1458 /// Ad resource associated with the companion ad.
1459 #[derive(Clone, Debug, PartialEq)]
1460 #[non_exhaustive]
1461 pub enum AdResource {
1462 /// The IFrame ad resource associated with the companion ad.
1463 IframeAdResource(std::boxed::Box<crate::model::IframeAdResource>),
1464 /// The static ad resource associated with the companion ad.
1465 StaticAdResource(std::boxed::Box<crate::model::StaticAdResource>),
1466 /// The HTML ad resource associated with the companion ad.
1467 HtmlAdResource(std::boxed::Box<crate::model::HtmlAdResource>),
1468 }
1469}
1470
1471/// Metadata for an HTML ad resource.
1472#[derive(Clone, Default, PartialEq)]
1473#[non_exhaustive]
1474pub struct HtmlAdResource {
1475 /// The HTML to display for the ad resource.
1476 pub html_source: std::string::String,
1477
1478 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1479}
1480
1481impl HtmlAdResource {
1482 /// Creates a new default instance.
1483 pub fn new() -> Self {
1484 std::default::Default::default()
1485 }
1486
1487 /// Sets the value of [html_source][crate::model::HtmlAdResource::html_source].
1488 ///
1489 /// # Example
1490 /// ```ignore,no_run
1491 /// # use google_cloud_video_stitcher_v1::model::HtmlAdResource;
1492 /// let x = HtmlAdResource::new().set_html_source("example");
1493 /// ```
1494 pub fn set_html_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1495 self.html_source = v.into();
1496 self
1497 }
1498}
1499
1500impl wkt::message::Message for HtmlAdResource {
1501 fn typename() -> &'static str {
1502 "type.googleapis.com/google.cloud.video.stitcher.v1.HtmlAdResource"
1503 }
1504}
1505
1506/// Metadata for an IFrame ad resource.
1507#[derive(Clone, Default, PartialEq)]
1508#[non_exhaustive]
1509pub struct IframeAdResource {
1510 /// URI source for an IFrame to display for the ad resource.
1511 pub uri: std::string::String,
1512
1513 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1514}
1515
1516impl IframeAdResource {
1517 /// Creates a new default instance.
1518 pub fn new() -> Self {
1519 std::default::Default::default()
1520 }
1521
1522 /// Sets the value of [uri][crate::model::IframeAdResource::uri].
1523 ///
1524 /// # Example
1525 /// ```ignore,no_run
1526 /// # use google_cloud_video_stitcher_v1::model::IframeAdResource;
1527 /// let x = IframeAdResource::new().set_uri("example");
1528 /// ```
1529 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1530 self.uri = v.into();
1531 self
1532 }
1533}
1534
1535impl wkt::message::Message for IframeAdResource {
1536 fn typename() -> &'static str {
1537 "type.googleapis.com/google.cloud.video.stitcher.v1.IframeAdResource"
1538 }
1539}
1540
1541/// Metadata for a static ad resource.
1542#[derive(Clone, Default, PartialEq)]
1543#[non_exhaustive]
1544pub struct StaticAdResource {
1545 /// URI to the static file for the ad resource.
1546 pub uri: std::string::String,
1547
1548 /// Describes the MIME type of the ad resource.
1549 pub creative_type: std::string::String,
1550
1551 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1552}
1553
1554impl StaticAdResource {
1555 /// Creates a new default instance.
1556 pub fn new() -> Self {
1557 std::default::Default::default()
1558 }
1559
1560 /// Sets the value of [uri][crate::model::StaticAdResource::uri].
1561 ///
1562 /// # Example
1563 /// ```ignore,no_run
1564 /// # use google_cloud_video_stitcher_v1::model::StaticAdResource;
1565 /// let x = StaticAdResource::new().set_uri("example");
1566 /// ```
1567 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1568 self.uri = v.into();
1569 self
1570 }
1571
1572 /// Sets the value of [creative_type][crate::model::StaticAdResource::creative_type].
1573 ///
1574 /// # Example
1575 /// ```ignore,no_run
1576 /// # use google_cloud_video_stitcher_v1::model::StaticAdResource;
1577 /// let x = StaticAdResource::new().set_creative_type("example");
1578 /// ```
1579 pub fn set_creative_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1580 self.creative_type = v.into();
1581 self
1582 }
1583}
1584
1585impl wkt::message::Message for StaticAdResource {
1586 fn typename() -> &'static str {
1587 "type.googleapis.com/google.cloud.video.stitcher.v1.StaticAdResource"
1588 }
1589}
1590
1591/// Describes an event and a trigger URI.
1592#[derive(Clone, Default, PartialEq)]
1593#[non_exhaustive]
1594pub struct Event {
1595 /// Describes the event that occurred.
1596 pub r#type: crate::model::event::EventType,
1597
1598 /// The URI to trigger for this event.
1599 pub uri: std::string::String,
1600
1601 /// The ID of the event.
1602 pub id: std::string::String,
1603
1604 /// The offset in seconds if the event type is `PROGRESS`.
1605 pub offset: std::option::Option<wkt::Duration>,
1606
1607 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1608}
1609
1610impl Event {
1611 /// Creates a new default instance.
1612 pub fn new() -> Self {
1613 std::default::Default::default()
1614 }
1615
1616 /// Sets the value of [r#type][crate::model::Event::type].
1617 ///
1618 /// # Example
1619 /// ```ignore,no_run
1620 /// # use google_cloud_video_stitcher_v1::model::Event;
1621 /// use google_cloud_video_stitcher_v1::model::event::EventType;
1622 /// let x0 = Event::new().set_type(EventType::CreativeView);
1623 /// let x1 = Event::new().set_type(EventType::Start);
1624 /// let x2 = Event::new().set_type(EventType::BreakStart);
1625 /// ```
1626 pub fn set_type<T: std::convert::Into<crate::model::event::EventType>>(mut self, v: T) -> Self {
1627 self.r#type = v.into();
1628 self
1629 }
1630
1631 /// Sets the value of [uri][crate::model::Event::uri].
1632 ///
1633 /// # Example
1634 /// ```ignore,no_run
1635 /// # use google_cloud_video_stitcher_v1::model::Event;
1636 /// let x = Event::new().set_uri("example");
1637 /// ```
1638 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1639 self.uri = v.into();
1640 self
1641 }
1642
1643 /// Sets the value of [id][crate::model::Event::id].
1644 ///
1645 /// # Example
1646 /// ```ignore,no_run
1647 /// # use google_cloud_video_stitcher_v1::model::Event;
1648 /// let x = Event::new().set_id("example");
1649 /// ```
1650 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1651 self.id = v.into();
1652 self
1653 }
1654
1655 /// Sets the value of [offset][crate::model::Event::offset].
1656 ///
1657 /// # Example
1658 /// ```ignore,no_run
1659 /// # use google_cloud_video_stitcher_v1::model::Event;
1660 /// use wkt::Duration;
1661 /// let x = Event::new().set_offset(Duration::default()/* use setters */);
1662 /// ```
1663 pub fn set_offset<T>(mut self, v: T) -> Self
1664 where
1665 T: std::convert::Into<wkt::Duration>,
1666 {
1667 self.offset = std::option::Option::Some(v.into());
1668 self
1669 }
1670
1671 /// Sets or clears the value of [offset][crate::model::Event::offset].
1672 ///
1673 /// # Example
1674 /// ```ignore,no_run
1675 /// # use google_cloud_video_stitcher_v1::model::Event;
1676 /// use wkt::Duration;
1677 /// let x = Event::new().set_or_clear_offset(Some(Duration::default()/* use setters */));
1678 /// let x = Event::new().set_or_clear_offset(None::<Duration>);
1679 /// ```
1680 pub fn set_or_clear_offset<T>(mut self, v: std::option::Option<T>) -> Self
1681 where
1682 T: std::convert::Into<wkt::Duration>,
1683 {
1684 self.offset = v.map(|x| x.into());
1685 self
1686 }
1687}
1688
1689impl wkt::message::Message for Event {
1690 fn typename() -> &'static str {
1691 "type.googleapis.com/google.cloud.video.stitcher.v1.Event"
1692 }
1693}
1694
1695/// Defines additional types related to [Event].
1696pub mod event {
1697 #[allow(unused_imports)]
1698 use super::*;
1699
1700 /// Describes the event that occurred.
1701 ///
1702 /// # Working with unknown values
1703 ///
1704 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1705 /// additional enum variants at any time. Adding new variants is not considered
1706 /// a breaking change. Applications should write their code in anticipation of:
1707 ///
1708 /// - New values appearing in future releases of the client library, **and**
1709 /// - New values received dynamically, without application changes.
1710 ///
1711 /// Please consult the [Working with enums] section in the user guide for some
1712 /// guidelines.
1713 ///
1714 /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1715 #[derive(Clone, Debug, PartialEq)]
1716 #[non_exhaustive]
1717 pub enum EventType {
1718 /// The event type is unspecified.
1719 Unspecified,
1720 /// First frame of creative ad viewed.
1721 CreativeView,
1722 /// Creative ad started.
1723 Start,
1724 /// Start of an ad break.
1725 BreakStart,
1726 /// End of an ad break.
1727 BreakEnd,
1728 /// Impression.
1729 Impression,
1730 /// First quartile progress.
1731 FirstQuartile,
1732 /// Midpoint progress.
1733 Midpoint,
1734 /// Third quartile progress.
1735 ThirdQuartile,
1736 /// Ad progress completed.
1737 Complete,
1738 /// Specific progress event with an offset.
1739 Progress,
1740 /// Player muted.
1741 Mute,
1742 /// Player unmuted.
1743 Unmute,
1744 /// Player paused.
1745 Pause,
1746 /// Click event.
1747 Click,
1748 /// Click-through event.
1749 ClickThrough,
1750 /// Player rewinding.
1751 Rewind,
1752 /// Player resumed.
1753 Resume,
1754 /// Error event.
1755 Error,
1756 /// Ad expanded to a larger size.
1757 Expand,
1758 /// Ad collapsed to a smaller size.
1759 Collapse,
1760 /// Non-linear ad closed.
1761 Close,
1762 /// Linear ad closed.
1763 CloseLinear,
1764 /// Ad skipped.
1765 Skip,
1766 /// Accept invitation event.
1767 AcceptInvitation,
1768 /// If set, the enum was initialized with an unknown value.
1769 ///
1770 /// Applications can examine the value using [EventType::value] or
1771 /// [EventType::name].
1772 UnknownValue(event_type::UnknownValue),
1773 }
1774
1775 #[doc(hidden)]
1776 pub mod event_type {
1777 #[allow(unused_imports)]
1778 use super::*;
1779 #[derive(Clone, Debug, PartialEq)]
1780 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1781 }
1782
1783 impl EventType {
1784 /// Gets the enum value.
1785 ///
1786 /// Returns `None` if the enum contains an unknown value deserialized from
1787 /// the string representation of enums.
1788 pub fn value(&self) -> std::option::Option<i32> {
1789 match self {
1790 Self::Unspecified => std::option::Option::Some(0),
1791 Self::CreativeView => std::option::Option::Some(1),
1792 Self::Start => std::option::Option::Some(2),
1793 Self::BreakStart => std::option::Option::Some(3),
1794 Self::BreakEnd => std::option::Option::Some(4),
1795 Self::Impression => std::option::Option::Some(5),
1796 Self::FirstQuartile => std::option::Option::Some(6),
1797 Self::Midpoint => std::option::Option::Some(7),
1798 Self::ThirdQuartile => std::option::Option::Some(8),
1799 Self::Complete => std::option::Option::Some(9),
1800 Self::Progress => std::option::Option::Some(10),
1801 Self::Mute => std::option::Option::Some(11),
1802 Self::Unmute => std::option::Option::Some(12),
1803 Self::Pause => std::option::Option::Some(13),
1804 Self::Click => std::option::Option::Some(14),
1805 Self::ClickThrough => std::option::Option::Some(15),
1806 Self::Rewind => std::option::Option::Some(16),
1807 Self::Resume => std::option::Option::Some(17),
1808 Self::Error => std::option::Option::Some(18),
1809 Self::Expand => std::option::Option::Some(21),
1810 Self::Collapse => std::option::Option::Some(22),
1811 Self::Close => std::option::Option::Some(24),
1812 Self::CloseLinear => std::option::Option::Some(25),
1813 Self::Skip => std::option::Option::Some(26),
1814 Self::AcceptInvitation => std::option::Option::Some(27),
1815 Self::UnknownValue(u) => u.0.value(),
1816 }
1817 }
1818
1819 /// Gets the enum value as a string.
1820 ///
1821 /// Returns `None` if the enum contains an unknown value deserialized from
1822 /// the integer representation of enums.
1823 pub fn name(&self) -> std::option::Option<&str> {
1824 match self {
1825 Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
1826 Self::CreativeView => std::option::Option::Some("CREATIVE_VIEW"),
1827 Self::Start => std::option::Option::Some("START"),
1828 Self::BreakStart => std::option::Option::Some("BREAK_START"),
1829 Self::BreakEnd => std::option::Option::Some("BREAK_END"),
1830 Self::Impression => std::option::Option::Some("IMPRESSION"),
1831 Self::FirstQuartile => std::option::Option::Some("FIRST_QUARTILE"),
1832 Self::Midpoint => std::option::Option::Some("MIDPOINT"),
1833 Self::ThirdQuartile => std::option::Option::Some("THIRD_QUARTILE"),
1834 Self::Complete => std::option::Option::Some("COMPLETE"),
1835 Self::Progress => std::option::Option::Some("PROGRESS"),
1836 Self::Mute => std::option::Option::Some("MUTE"),
1837 Self::Unmute => std::option::Option::Some("UNMUTE"),
1838 Self::Pause => std::option::Option::Some("PAUSE"),
1839 Self::Click => std::option::Option::Some("CLICK"),
1840 Self::ClickThrough => std::option::Option::Some("CLICK_THROUGH"),
1841 Self::Rewind => std::option::Option::Some("REWIND"),
1842 Self::Resume => std::option::Option::Some("RESUME"),
1843 Self::Error => std::option::Option::Some("ERROR"),
1844 Self::Expand => std::option::Option::Some("EXPAND"),
1845 Self::Collapse => std::option::Option::Some("COLLAPSE"),
1846 Self::Close => std::option::Option::Some("CLOSE"),
1847 Self::CloseLinear => std::option::Option::Some("CLOSE_LINEAR"),
1848 Self::Skip => std::option::Option::Some("SKIP"),
1849 Self::AcceptInvitation => std::option::Option::Some("ACCEPT_INVITATION"),
1850 Self::UnknownValue(u) => u.0.name(),
1851 }
1852 }
1853 }
1854
1855 impl std::default::Default for EventType {
1856 fn default() -> Self {
1857 use std::convert::From;
1858 Self::from(0)
1859 }
1860 }
1861
1862 impl std::fmt::Display for EventType {
1863 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1864 wkt::internal::display_enum(f, self.name(), self.value())
1865 }
1866 }
1867
1868 impl std::convert::From<i32> for EventType {
1869 fn from(value: i32) -> Self {
1870 match value {
1871 0 => Self::Unspecified,
1872 1 => Self::CreativeView,
1873 2 => Self::Start,
1874 3 => Self::BreakStart,
1875 4 => Self::BreakEnd,
1876 5 => Self::Impression,
1877 6 => Self::FirstQuartile,
1878 7 => Self::Midpoint,
1879 8 => Self::ThirdQuartile,
1880 9 => Self::Complete,
1881 10 => Self::Progress,
1882 11 => Self::Mute,
1883 12 => Self::Unmute,
1884 13 => Self::Pause,
1885 14 => Self::Click,
1886 15 => Self::ClickThrough,
1887 16 => Self::Rewind,
1888 17 => Self::Resume,
1889 18 => Self::Error,
1890 21 => Self::Expand,
1891 22 => Self::Collapse,
1892 24 => Self::Close,
1893 25 => Self::CloseLinear,
1894 26 => Self::Skip,
1895 27 => Self::AcceptInvitation,
1896 _ => Self::UnknownValue(event_type::UnknownValue(
1897 wkt::internal::UnknownEnumValue::Integer(value),
1898 )),
1899 }
1900 }
1901 }
1902
1903 impl std::convert::From<&str> for EventType {
1904 fn from(value: &str) -> Self {
1905 use std::string::ToString;
1906 match value {
1907 "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
1908 "CREATIVE_VIEW" => Self::CreativeView,
1909 "START" => Self::Start,
1910 "BREAK_START" => Self::BreakStart,
1911 "BREAK_END" => Self::BreakEnd,
1912 "IMPRESSION" => Self::Impression,
1913 "FIRST_QUARTILE" => Self::FirstQuartile,
1914 "MIDPOINT" => Self::Midpoint,
1915 "THIRD_QUARTILE" => Self::ThirdQuartile,
1916 "COMPLETE" => Self::Complete,
1917 "PROGRESS" => Self::Progress,
1918 "MUTE" => Self::Mute,
1919 "UNMUTE" => Self::Unmute,
1920 "PAUSE" => Self::Pause,
1921 "CLICK" => Self::Click,
1922 "CLICK_THROUGH" => Self::ClickThrough,
1923 "REWIND" => Self::Rewind,
1924 "RESUME" => Self::Resume,
1925 "ERROR" => Self::Error,
1926 "EXPAND" => Self::Expand,
1927 "COLLAPSE" => Self::Collapse,
1928 "CLOSE" => Self::Close,
1929 "CLOSE_LINEAR" => Self::CloseLinear,
1930 "SKIP" => Self::Skip,
1931 "ACCEPT_INVITATION" => Self::AcceptInvitation,
1932 _ => Self::UnknownValue(event_type::UnknownValue(
1933 wkt::internal::UnknownEnumValue::String(value.to_string()),
1934 )),
1935 }
1936 }
1937 }
1938
1939 impl serde::ser::Serialize for EventType {
1940 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1941 where
1942 S: serde::Serializer,
1943 {
1944 match self {
1945 Self::Unspecified => serializer.serialize_i32(0),
1946 Self::CreativeView => serializer.serialize_i32(1),
1947 Self::Start => serializer.serialize_i32(2),
1948 Self::BreakStart => serializer.serialize_i32(3),
1949 Self::BreakEnd => serializer.serialize_i32(4),
1950 Self::Impression => serializer.serialize_i32(5),
1951 Self::FirstQuartile => serializer.serialize_i32(6),
1952 Self::Midpoint => serializer.serialize_i32(7),
1953 Self::ThirdQuartile => serializer.serialize_i32(8),
1954 Self::Complete => serializer.serialize_i32(9),
1955 Self::Progress => serializer.serialize_i32(10),
1956 Self::Mute => serializer.serialize_i32(11),
1957 Self::Unmute => serializer.serialize_i32(12),
1958 Self::Pause => serializer.serialize_i32(13),
1959 Self::Click => serializer.serialize_i32(14),
1960 Self::ClickThrough => serializer.serialize_i32(15),
1961 Self::Rewind => serializer.serialize_i32(16),
1962 Self::Resume => serializer.serialize_i32(17),
1963 Self::Error => serializer.serialize_i32(18),
1964 Self::Expand => serializer.serialize_i32(21),
1965 Self::Collapse => serializer.serialize_i32(22),
1966 Self::Close => serializer.serialize_i32(24),
1967 Self::CloseLinear => serializer.serialize_i32(25),
1968 Self::Skip => serializer.serialize_i32(26),
1969 Self::AcceptInvitation => serializer.serialize_i32(27),
1970 Self::UnknownValue(u) => u.0.serialize(serializer),
1971 }
1972 }
1973 }
1974
1975 impl<'de> serde::de::Deserialize<'de> for EventType {
1976 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1977 where
1978 D: serde::Deserializer<'de>,
1979 {
1980 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
1981 ".google.cloud.video.stitcher.v1.Event.EventType",
1982 ))
1983 }
1984 }
1985}
1986
1987/// Indicates a time in which a list of events should be triggered
1988/// during media playback.
1989#[derive(Clone, Default, PartialEq)]
1990#[non_exhaustive]
1991pub struct ProgressEvent {
1992 /// The time when the following tracking events occurs. The time is in
1993 /// seconds relative to the start of the VOD asset.
1994 pub time_offset: std::option::Option<wkt::Duration>,
1995
1996 /// The list of progress tracking events for the ad break. These can be of
1997 /// the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`,
1998 /// `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`,
1999 /// `COMPLETE`, `PROGRESS`.
2000 pub events: std::vec::Vec<crate::model::Event>,
2001
2002 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2003}
2004
2005impl ProgressEvent {
2006 /// Creates a new default instance.
2007 pub fn new() -> Self {
2008 std::default::Default::default()
2009 }
2010
2011 /// Sets the value of [time_offset][crate::model::ProgressEvent::time_offset].
2012 ///
2013 /// # Example
2014 /// ```ignore,no_run
2015 /// # use google_cloud_video_stitcher_v1::model::ProgressEvent;
2016 /// use wkt::Duration;
2017 /// let x = ProgressEvent::new().set_time_offset(Duration::default()/* use setters */);
2018 /// ```
2019 pub fn set_time_offset<T>(mut self, v: T) -> Self
2020 where
2021 T: std::convert::Into<wkt::Duration>,
2022 {
2023 self.time_offset = std::option::Option::Some(v.into());
2024 self
2025 }
2026
2027 /// Sets or clears the value of [time_offset][crate::model::ProgressEvent::time_offset].
2028 ///
2029 /// # Example
2030 /// ```ignore,no_run
2031 /// # use google_cloud_video_stitcher_v1::model::ProgressEvent;
2032 /// use wkt::Duration;
2033 /// let x = ProgressEvent::new().set_or_clear_time_offset(Some(Duration::default()/* use setters */));
2034 /// let x = ProgressEvent::new().set_or_clear_time_offset(None::<Duration>);
2035 /// ```
2036 pub fn set_or_clear_time_offset<T>(mut self, v: std::option::Option<T>) -> Self
2037 where
2038 T: std::convert::Into<wkt::Duration>,
2039 {
2040 self.time_offset = v.map(|x| x.into());
2041 self
2042 }
2043
2044 /// Sets the value of [events][crate::model::ProgressEvent::events].
2045 ///
2046 /// # Example
2047 /// ```ignore,no_run
2048 /// # use google_cloud_video_stitcher_v1::model::ProgressEvent;
2049 /// use google_cloud_video_stitcher_v1::model::Event;
2050 /// let x = ProgressEvent::new()
2051 /// .set_events([
2052 /// Event::default()/* use setters */,
2053 /// Event::default()/* use (different) setters */,
2054 /// ]);
2055 /// ```
2056 pub fn set_events<T, V>(mut self, v: T) -> Self
2057 where
2058 T: std::iter::IntoIterator<Item = V>,
2059 V: std::convert::Into<crate::model::Event>,
2060 {
2061 use std::iter::Iterator;
2062 self.events = v.into_iter().map(|i| i.into()).collect();
2063 self
2064 }
2065}
2066
2067impl wkt::message::Message for ProgressEvent {
2068 fn typename() -> &'static str {
2069 "type.googleapis.com/google.cloud.video.stitcher.v1.ProgressEvent"
2070 }
2071}
2072
2073/// Options on how fetches should be made.
2074#[derive(Clone, Default, PartialEq)]
2075#[non_exhaustive]
2076pub struct FetchOptions {
2077 /// Custom headers to pass into fetch request.
2078 /// Headers must have a maximum of 3 key value pairs.
2079 /// Each key value pair must have a maximum of 256 characters per key and 256
2080 /// characters per value.
2081 pub headers: std::collections::HashMap<std::string::String, std::string::String>,
2082
2083 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2084}
2085
2086impl FetchOptions {
2087 /// Creates a new default instance.
2088 pub fn new() -> Self {
2089 std::default::Default::default()
2090 }
2091
2092 /// Sets the value of [headers][crate::model::FetchOptions::headers].
2093 ///
2094 /// # Example
2095 /// ```ignore,no_run
2096 /// # use google_cloud_video_stitcher_v1::model::FetchOptions;
2097 /// let x = FetchOptions::new().set_headers([
2098 /// ("key0", "abc"),
2099 /// ("key1", "xyz"),
2100 /// ]);
2101 /// ```
2102 pub fn set_headers<T, K, V>(mut self, v: T) -> Self
2103 where
2104 T: std::iter::IntoIterator<Item = (K, V)>,
2105 K: std::convert::Into<std::string::String>,
2106 V: std::convert::Into<std::string::String>,
2107 {
2108 use std::iter::Iterator;
2109 self.headers = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2110 self
2111 }
2112}
2113
2114impl wkt::message::Message for FetchOptions {
2115 fn typename() -> &'static str {
2116 "type.googleapis.com/google.cloud.video.stitcher.v1.FetchOptions"
2117 }
2118}
2119
2120/// Metadata for used to register live configs.
2121#[derive(Clone, Default, PartialEq)]
2122#[non_exhaustive]
2123pub struct LiveConfig {
2124 /// Output only. The resource name of the live config, in the form of
2125 /// `projects/{project}/locations/{location}/liveConfigs/{id}`.
2126 pub name: std::string::String,
2127
2128 /// Required. Source URI for the live stream manifest.
2129 pub source_uri: std::string::String,
2130
2131 /// The default ad tag associated with this live stream config.
2132 pub ad_tag_uri: std::string::String,
2133
2134 /// Additional metadata used to register a live stream with Google Ad Manager
2135 /// (GAM)
2136 pub gam_live_config: std::option::Option<crate::model::GamLiveConfig>,
2137
2138 /// Output only. State of the live config.
2139 pub state: crate::model::live_config::State,
2140
2141 /// Required. Determines how the ads are tracked.
2142 pub ad_tracking: crate::model::AdTracking,
2143
2144 /// This must refer to a slate in the same
2145 /// project. If Google Ad Manager (GAM) is used for ads, this string sets the
2146 /// value of `slateCreativeId` in
2147 /// <https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId>
2148 pub default_slate: std::string::String,
2149
2150 /// Defines the stitcher behavior in case an ad does not align exactly with
2151 /// the ad break boundaries. If not specified, the default is `CUT_CURRENT`.
2152 pub stitching_policy: crate::model::live_config::StitchingPolicy,
2153
2154 /// The configuration for prefetching ads.
2155 pub prefetch_config: std::option::Option<crate::model::PrefetchConfig>,
2156
2157 /// Options for fetching source manifests and segments.
2158 pub source_fetch_options: std::option::Option<crate::model::FetchOptions>,
2159
2160 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2161}
2162
2163impl LiveConfig {
2164 /// Creates a new default instance.
2165 pub fn new() -> Self {
2166 std::default::Default::default()
2167 }
2168
2169 /// Sets the value of [name][crate::model::LiveConfig::name].
2170 ///
2171 /// # Example
2172 /// ```ignore,no_run
2173 /// # use google_cloud_video_stitcher_v1::model::LiveConfig;
2174 /// # let project_id = "project_id";
2175 /// # let location_id = "location_id";
2176 /// # let live_config_id = "live_config_id";
2177 /// let x = LiveConfig::new().set_name(format!("projects/{project_id}/locations/{location_id}/liveConfigs/{live_config_id}"));
2178 /// ```
2179 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2180 self.name = v.into();
2181 self
2182 }
2183
2184 /// Sets the value of [source_uri][crate::model::LiveConfig::source_uri].
2185 ///
2186 /// # Example
2187 /// ```ignore,no_run
2188 /// # use google_cloud_video_stitcher_v1::model::LiveConfig;
2189 /// let x = LiveConfig::new().set_source_uri("example");
2190 /// ```
2191 pub fn set_source_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2192 self.source_uri = v.into();
2193 self
2194 }
2195
2196 /// Sets the value of [ad_tag_uri][crate::model::LiveConfig::ad_tag_uri].
2197 ///
2198 /// # Example
2199 /// ```ignore,no_run
2200 /// # use google_cloud_video_stitcher_v1::model::LiveConfig;
2201 /// let x = LiveConfig::new().set_ad_tag_uri("example");
2202 /// ```
2203 pub fn set_ad_tag_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2204 self.ad_tag_uri = v.into();
2205 self
2206 }
2207
2208 /// Sets the value of [gam_live_config][crate::model::LiveConfig::gam_live_config].
2209 ///
2210 /// # Example
2211 /// ```ignore,no_run
2212 /// # use google_cloud_video_stitcher_v1::model::LiveConfig;
2213 /// use google_cloud_video_stitcher_v1::model::GamLiveConfig;
2214 /// let x = LiveConfig::new().set_gam_live_config(GamLiveConfig::default()/* use setters */);
2215 /// ```
2216 pub fn set_gam_live_config<T>(mut self, v: T) -> Self
2217 where
2218 T: std::convert::Into<crate::model::GamLiveConfig>,
2219 {
2220 self.gam_live_config = std::option::Option::Some(v.into());
2221 self
2222 }
2223
2224 /// Sets or clears the value of [gam_live_config][crate::model::LiveConfig::gam_live_config].
2225 ///
2226 /// # Example
2227 /// ```ignore,no_run
2228 /// # use google_cloud_video_stitcher_v1::model::LiveConfig;
2229 /// use google_cloud_video_stitcher_v1::model::GamLiveConfig;
2230 /// let x = LiveConfig::new().set_or_clear_gam_live_config(Some(GamLiveConfig::default()/* use setters */));
2231 /// let x = LiveConfig::new().set_or_clear_gam_live_config(None::<GamLiveConfig>);
2232 /// ```
2233 pub fn set_or_clear_gam_live_config<T>(mut self, v: std::option::Option<T>) -> Self
2234 where
2235 T: std::convert::Into<crate::model::GamLiveConfig>,
2236 {
2237 self.gam_live_config = v.map(|x| x.into());
2238 self
2239 }
2240
2241 /// Sets the value of [state][crate::model::LiveConfig::state].
2242 ///
2243 /// # Example
2244 /// ```ignore,no_run
2245 /// # use google_cloud_video_stitcher_v1::model::LiveConfig;
2246 /// use google_cloud_video_stitcher_v1::model::live_config::State;
2247 /// let x0 = LiveConfig::new().set_state(State::Creating);
2248 /// let x1 = LiveConfig::new().set_state(State::Ready);
2249 /// let x2 = LiveConfig::new().set_state(State::Deleting);
2250 /// ```
2251 pub fn set_state<T: std::convert::Into<crate::model::live_config::State>>(
2252 mut self,
2253 v: T,
2254 ) -> Self {
2255 self.state = v.into();
2256 self
2257 }
2258
2259 /// Sets the value of [ad_tracking][crate::model::LiveConfig::ad_tracking].
2260 ///
2261 /// # Example
2262 /// ```ignore,no_run
2263 /// # use google_cloud_video_stitcher_v1::model::LiveConfig;
2264 /// use google_cloud_video_stitcher_v1::model::AdTracking;
2265 /// let x0 = LiveConfig::new().set_ad_tracking(AdTracking::Client);
2266 /// let x1 = LiveConfig::new().set_ad_tracking(AdTracking::Server);
2267 /// ```
2268 pub fn set_ad_tracking<T: std::convert::Into<crate::model::AdTracking>>(
2269 mut self,
2270 v: T,
2271 ) -> Self {
2272 self.ad_tracking = v.into();
2273 self
2274 }
2275
2276 /// Sets the value of [default_slate][crate::model::LiveConfig::default_slate].
2277 ///
2278 /// # Example
2279 /// ```ignore,no_run
2280 /// # use google_cloud_video_stitcher_v1::model::LiveConfig;
2281 /// # let project_id = "project_id";
2282 /// # let location_id = "location_id";
2283 /// # let slate_id = "slate_id";
2284 /// let x = LiveConfig::new().set_default_slate(format!("projects/{project_id}/locations/{location_id}/slates/{slate_id}"));
2285 /// ```
2286 pub fn set_default_slate<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2287 self.default_slate = v.into();
2288 self
2289 }
2290
2291 /// Sets the value of [stitching_policy][crate::model::LiveConfig::stitching_policy].
2292 ///
2293 /// # Example
2294 /// ```ignore,no_run
2295 /// # use google_cloud_video_stitcher_v1::model::LiveConfig;
2296 /// use google_cloud_video_stitcher_v1::model::live_config::StitchingPolicy;
2297 /// let x0 = LiveConfig::new().set_stitching_policy(StitchingPolicy::CutCurrent);
2298 /// let x1 = LiveConfig::new().set_stitching_policy(StitchingPolicy::CompleteAd);
2299 /// ```
2300 pub fn set_stitching_policy<
2301 T: std::convert::Into<crate::model::live_config::StitchingPolicy>,
2302 >(
2303 mut self,
2304 v: T,
2305 ) -> Self {
2306 self.stitching_policy = v.into();
2307 self
2308 }
2309
2310 /// Sets the value of [prefetch_config][crate::model::LiveConfig::prefetch_config].
2311 ///
2312 /// # Example
2313 /// ```ignore,no_run
2314 /// # use google_cloud_video_stitcher_v1::model::LiveConfig;
2315 /// use google_cloud_video_stitcher_v1::model::PrefetchConfig;
2316 /// let x = LiveConfig::new().set_prefetch_config(PrefetchConfig::default()/* use setters */);
2317 /// ```
2318 pub fn set_prefetch_config<T>(mut self, v: T) -> Self
2319 where
2320 T: std::convert::Into<crate::model::PrefetchConfig>,
2321 {
2322 self.prefetch_config = std::option::Option::Some(v.into());
2323 self
2324 }
2325
2326 /// Sets or clears the value of [prefetch_config][crate::model::LiveConfig::prefetch_config].
2327 ///
2328 /// # Example
2329 /// ```ignore,no_run
2330 /// # use google_cloud_video_stitcher_v1::model::LiveConfig;
2331 /// use google_cloud_video_stitcher_v1::model::PrefetchConfig;
2332 /// let x = LiveConfig::new().set_or_clear_prefetch_config(Some(PrefetchConfig::default()/* use setters */));
2333 /// let x = LiveConfig::new().set_or_clear_prefetch_config(None::<PrefetchConfig>);
2334 /// ```
2335 pub fn set_or_clear_prefetch_config<T>(mut self, v: std::option::Option<T>) -> Self
2336 where
2337 T: std::convert::Into<crate::model::PrefetchConfig>,
2338 {
2339 self.prefetch_config = v.map(|x| x.into());
2340 self
2341 }
2342
2343 /// Sets the value of [source_fetch_options][crate::model::LiveConfig::source_fetch_options].
2344 ///
2345 /// # Example
2346 /// ```ignore,no_run
2347 /// # use google_cloud_video_stitcher_v1::model::LiveConfig;
2348 /// use google_cloud_video_stitcher_v1::model::FetchOptions;
2349 /// let x = LiveConfig::new().set_source_fetch_options(FetchOptions::default()/* use setters */);
2350 /// ```
2351 pub fn set_source_fetch_options<T>(mut self, v: T) -> Self
2352 where
2353 T: std::convert::Into<crate::model::FetchOptions>,
2354 {
2355 self.source_fetch_options = std::option::Option::Some(v.into());
2356 self
2357 }
2358
2359 /// Sets or clears the value of [source_fetch_options][crate::model::LiveConfig::source_fetch_options].
2360 ///
2361 /// # Example
2362 /// ```ignore,no_run
2363 /// # use google_cloud_video_stitcher_v1::model::LiveConfig;
2364 /// use google_cloud_video_stitcher_v1::model::FetchOptions;
2365 /// let x = LiveConfig::new().set_or_clear_source_fetch_options(Some(FetchOptions::default()/* use setters */));
2366 /// let x = LiveConfig::new().set_or_clear_source_fetch_options(None::<FetchOptions>);
2367 /// ```
2368 pub fn set_or_clear_source_fetch_options<T>(mut self, v: std::option::Option<T>) -> Self
2369 where
2370 T: std::convert::Into<crate::model::FetchOptions>,
2371 {
2372 self.source_fetch_options = v.map(|x| x.into());
2373 self
2374 }
2375}
2376
2377impl wkt::message::Message for LiveConfig {
2378 fn typename() -> &'static str {
2379 "type.googleapis.com/google.cloud.video.stitcher.v1.LiveConfig"
2380 }
2381}
2382
2383/// Defines additional types related to [LiveConfig].
2384pub mod live_config {
2385 #[allow(unused_imports)]
2386 use super::*;
2387
2388 /// State of the live config.
2389 ///
2390 /// # Working with unknown values
2391 ///
2392 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2393 /// additional enum variants at any time. Adding new variants is not considered
2394 /// a breaking change. Applications should write their code in anticipation of:
2395 ///
2396 /// - New values appearing in future releases of the client library, **and**
2397 /// - New values received dynamically, without application changes.
2398 ///
2399 /// Please consult the [Working with enums] section in the user guide for some
2400 /// guidelines.
2401 ///
2402 /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
2403 #[derive(Clone, Debug, PartialEq)]
2404 #[non_exhaustive]
2405 pub enum State {
2406 /// State is not specified.
2407 Unspecified,
2408 /// Live config is being created.
2409 Creating,
2410 /// Live config is ready for use.
2411 Ready,
2412 /// Live config is queued up for deletion.
2413 Deleting,
2414 /// If set, the enum was initialized with an unknown value.
2415 ///
2416 /// Applications can examine the value using [State::value] or
2417 /// [State::name].
2418 UnknownValue(state::UnknownValue),
2419 }
2420
2421 #[doc(hidden)]
2422 pub mod state {
2423 #[allow(unused_imports)]
2424 use super::*;
2425 #[derive(Clone, Debug, PartialEq)]
2426 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2427 }
2428
2429 impl State {
2430 /// Gets the enum value.
2431 ///
2432 /// Returns `None` if the enum contains an unknown value deserialized from
2433 /// the string representation of enums.
2434 pub fn value(&self) -> std::option::Option<i32> {
2435 match self {
2436 Self::Unspecified => std::option::Option::Some(0),
2437 Self::Creating => std::option::Option::Some(1),
2438 Self::Ready => std::option::Option::Some(2),
2439 Self::Deleting => std::option::Option::Some(3),
2440 Self::UnknownValue(u) => u.0.value(),
2441 }
2442 }
2443
2444 /// Gets the enum value as a string.
2445 ///
2446 /// Returns `None` if the enum contains an unknown value deserialized from
2447 /// the integer representation of enums.
2448 pub fn name(&self) -> std::option::Option<&str> {
2449 match self {
2450 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
2451 Self::Creating => std::option::Option::Some("CREATING"),
2452 Self::Ready => std::option::Option::Some("READY"),
2453 Self::Deleting => std::option::Option::Some("DELETING"),
2454 Self::UnknownValue(u) => u.0.name(),
2455 }
2456 }
2457 }
2458
2459 impl std::default::Default for State {
2460 fn default() -> Self {
2461 use std::convert::From;
2462 Self::from(0)
2463 }
2464 }
2465
2466 impl std::fmt::Display for State {
2467 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2468 wkt::internal::display_enum(f, self.name(), self.value())
2469 }
2470 }
2471
2472 impl std::convert::From<i32> for State {
2473 fn from(value: i32) -> Self {
2474 match value {
2475 0 => Self::Unspecified,
2476 1 => Self::Creating,
2477 2 => Self::Ready,
2478 3 => Self::Deleting,
2479 _ => Self::UnknownValue(state::UnknownValue(
2480 wkt::internal::UnknownEnumValue::Integer(value),
2481 )),
2482 }
2483 }
2484 }
2485
2486 impl std::convert::From<&str> for State {
2487 fn from(value: &str) -> Self {
2488 use std::string::ToString;
2489 match value {
2490 "STATE_UNSPECIFIED" => Self::Unspecified,
2491 "CREATING" => Self::Creating,
2492 "READY" => Self::Ready,
2493 "DELETING" => Self::Deleting,
2494 _ => Self::UnknownValue(state::UnknownValue(
2495 wkt::internal::UnknownEnumValue::String(value.to_string()),
2496 )),
2497 }
2498 }
2499 }
2500
2501 impl serde::ser::Serialize for State {
2502 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2503 where
2504 S: serde::Serializer,
2505 {
2506 match self {
2507 Self::Unspecified => serializer.serialize_i32(0),
2508 Self::Creating => serializer.serialize_i32(1),
2509 Self::Ready => serializer.serialize_i32(2),
2510 Self::Deleting => serializer.serialize_i32(3),
2511 Self::UnknownValue(u) => u.0.serialize(serializer),
2512 }
2513 }
2514 }
2515
2516 impl<'de> serde::de::Deserialize<'de> for State {
2517 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2518 where
2519 D: serde::Deserializer<'de>,
2520 {
2521 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
2522 ".google.cloud.video.stitcher.v1.LiveConfig.State",
2523 ))
2524 }
2525 }
2526
2527 /// Defines the ad stitching behavior in case the ad duration does not align
2528 /// exactly with the ad break boundaries. If not specified, the default is
2529 /// `CUT_CURRENT`.
2530 ///
2531 /// # Working with unknown values
2532 ///
2533 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2534 /// additional enum variants at any time. Adding new variants is not considered
2535 /// a breaking change. Applications should write their code in anticipation of:
2536 ///
2537 /// - New values appearing in future releases of the client library, **and**
2538 /// - New values received dynamically, without application changes.
2539 ///
2540 /// Please consult the [Working with enums] section in the user guide for some
2541 /// guidelines.
2542 ///
2543 /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
2544 #[derive(Clone, Debug, PartialEq)]
2545 #[non_exhaustive]
2546 pub enum StitchingPolicy {
2547 /// Stitching policy is not specified.
2548 Unspecified,
2549 /// Cuts an ad short and returns to content in the middle of the ad.
2550 CutCurrent,
2551 /// Finishes stitching the current ad before returning to content.
2552 CompleteAd,
2553 /// If set, the enum was initialized with an unknown value.
2554 ///
2555 /// Applications can examine the value using [StitchingPolicy::value] or
2556 /// [StitchingPolicy::name].
2557 UnknownValue(stitching_policy::UnknownValue),
2558 }
2559
2560 #[doc(hidden)]
2561 pub mod stitching_policy {
2562 #[allow(unused_imports)]
2563 use super::*;
2564 #[derive(Clone, Debug, PartialEq)]
2565 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2566 }
2567
2568 impl StitchingPolicy {
2569 /// Gets the enum value.
2570 ///
2571 /// Returns `None` if the enum contains an unknown value deserialized from
2572 /// the string representation of enums.
2573 pub fn value(&self) -> std::option::Option<i32> {
2574 match self {
2575 Self::Unspecified => std::option::Option::Some(0),
2576 Self::CutCurrent => std::option::Option::Some(1),
2577 Self::CompleteAd => std::option::Option::Some(2),
2578 Self::UnknownValue(u) => u.0.value(),
2579 }
2580 }
2581
2582 /// Gets the enum value as a string.
2583 ///
2584 /// Returns `None` if the enum contains an unknown value deserialized from
2585 /// the integer representation of enums.
2586 pub fn name(&self) -> std::option::Option<&str> {
2587 match self {
2588 Self::Unspecified => std::option::Option::Some("STITCHING_POLICY_UNSPECIFIED"),
2589 Self::CutCurrent => std::option::Option::Some("CUT_CURRENT"),
2590 Self::CompleteAd => std::option::Option::Some("COMPLETE_AD"),
2591 Self::UnknownValue(u) => u.0.name(),
2592 }
2593 }
2594 }
2595
2596 impl std::default::Default for StitchingPolicy {
2597 fn default() -> Self {
2598 use std::convert::From;
2599 Self::from(0)
2600 }
2601 }
2602
2603 impl std::fmt::Display for StitchingPolicy {
2604 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2605 wkt::internal::display_enum(f, self.name(), self.value())
2606 }
2607 }
2608
2609 impl std::convert::From<i32> for StitchingPolicy {
2610 fn from(value: i32) -> Self {
2611 match value {
2612 0 => Self::Unspecified,
2613 1 => Self::CutCurrent,
2614 2 => Self::CompleteAd,
2615 _ => Self::UnknownValue(stitching_policy::UnknownValue(
2616 wkt::internal::UnknownEnumValue::Integer(value),
2617 )),
2618 }
2619 }
2620 }
2621
2622 impl std::convert::From<&str> for StitchingPolicy {
2623 fn from(value: &str) -> Self {
2624 use std::string::ToString;
2625 match value {
2626 "STITCHING_POLICY_UNSPECIFIED" => Self::Unspecified,
2627 "CUT_CURRENT" => Self::CutCurrent,
2628 "COMPLETE_AD" => Self::CompleteAd,
2629 _ => Self::UnknownValue(stitching_policy::UnknownValue(
2630 wkt::internal::UnknownEnumValue::String(value.to_string()),
2631 )),
2632 }
2633 }
2634 }
2635
2636 impl serde::ser::Serialize for StitchingPolicy {
2637 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2638 where
2639 S: serde::Serializer,
2640 {
2641 match self {
2642 Self::Unspecified => serializer.serialize_i32(0),
2643 Self::CutCurrent => serializer.serialize_i32(1),
2644 Self::CompleteAd => serializer.serialize_i32(2),
2645 Self::UnknownValue(u) => u.0.serialize(serializer),
2646 }
2647 }
2648 }
2649
2650 impl<'de> serde::de::Deserialize<'de> for StitchingPolicy {
2651 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2652 where
2653 D: serde::Deserializer<'de>,
2654 {
2655 deserializer.deserialize_any(wkt::internal::EnumVisitor::<StitchingPolicy>::new(
2656 ".google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy",
2657 ))
2658 }
2659 }
2660}
2661
2662/// The configuration for prefetch ads.
2663#[derive(Clone, Default, PartialEq)]
2664#[non_exhaustive]
2665pub struct PrefetchConfig {
2666 /// Required. Indicates whether the option to prefetch ad requests is enabled.
2667 pub enabled: bool,
2668
2669 /// The duration in seconds of the part of the break to be prefetched.
2670 /// This field is only relevant if prefetch is enabled.
2671 /// You should set this duration to as long as possible to increase the
2672 /// benefits of prefetching, but not longer than the shortest ad break
2673 /// expected. For example, for a live event with 30s and 60s ad breaks, the
2674 /// initial duration should be set to 30s.
2675 pub initial_ad_request_duration: std::option::Option<wkt::Duration>,
2676
2677 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2678}
2679
2680impl PrefetchConfig {
2681 /// Creates a new default instance.
2682 pub fn new() -> Self {
2683 std::default::Default::default()
2684 }
2685
2686 /// Sets the value of [enabled][crate::model::PrefetchConfig::enabled].
2687 ///
2688 /// # Example
2689 /// ```ignore,no_run
2690 /// # use google_cloud_video_stitcher_v1::model::PrefetchConfig;
2691 /// let x = PrefetchConfig::new().set_enabled(true);
2692 /// ```
2693 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2694 self.enabled = v.into();
2695 self
2696 }
2697
2698 /// Sets the value of [initial_ad_request_duration][crate::model::PrefetchConfig::initial_ad_request_duration].
2699 ///
2700 /// # Example
2701 /// ```ignore,no_run
2702 /// # use google_cloud_video_stitcher_v1::model::PrefetchConfig;
2703 /// use wkt::Duration;
2704 /// let x = PrefetchConfig::new().set_initial_ad_request_duration(Duration::default()/* use setters */);
2705 /// ```
2706 pub fn set_initial_ad_request_duration<T>(mut self, v: T) -> Self
2707 where
2708 T: std::convert::Into<wkt::Duration>,
2709 {
2710 self.initial_ad_request_duration = std::option::Option::Some(v.into());
2711 self
2712 }
2713
2714 /// Sets or clears the value of [initial_ad_request_duration][crate::model::PrefetchConfig::initial_ad_request_duration].
2715 ///
2716 /// # Example
2717 /// ```ignore,no_run
2718 /// # use google_cloud_video_stitcher_v1::model::PrefetchConfig;
2719 /// use wkt::Duration;
2720 /// let x = PrefetchConfig::new().set_or_clear_initial_ad_request_duration(Some(Duration::default()/* use setters */));
2721 /// let x = PrefetchConfig::new().set_or_clear_initial_ad_request_duration(None::<Duration>);
2722 /// ```
2723 pub fn set_or_clear_initial_ad_request_duration<T>(mut self, v: std::option::Option<T>) -> Self
2724 where
2725 T: std::convert::Into<wkt::Duration>,
2726 {
2727 self.initial_ad_request_duration = v.map(|x| x.into());
2728 self
2729 }
2730}
2731
2732impl wkt::message::Message for PrefetchConfig {
2733 fn typename() -> &'static str {
2734 "type.googleapis.com/google.cloud.video.stitcher.v1.PrefetchConfig"
2735 }
2736}
2737
2738/// Metadata used to register a live stream with Google Ad Manager (GAM)
2739#[derive(Clone, Default, PartialEq)]
2740#[non_exhaustive]
2741pub struct GamLiveConfig {
2742 /// Required. Ad Manager network code to associate with the live config.
2743 pub network_code: std::string::String,
2744
2745 /// Output only. The asset key identifier generated for the live config.
2746 pub asset_key: std::string::String,
2747
2748 /// Output only. The custom asset key identifier generated for the live config.
2749 pub custom_asset_key: std::string::String,
2750
2751 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2752}
2753
2754impl GamLiveConfig {
2755 /// Creates a new default instance.
2756 pub fn new() -> Self {
2757 std::default::Default::default()
2758 }
2759
2760 /// Sets the value of [network_code][crate::model::GamLiveConfig::network_code].
2761 ///
2762 /// # Example
2763 /// ```ignore,no_run
2764 /// # use google_cloud_video_stitcher_v1::model::GamLiveConfig;
2765 /// let x = GamLiveConfig::new().set_network_code("example");
2766 /// ```
2767 pub fn set_network_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2768 self.network_code = v.into();
2769 self
2770 }
2771
2772 /// Sets the value of [asset_key][crate::model::GamLiveConfig::asset_key].
2773 ///
2774 /// # Example
2775 /// ```ignore,no_run
2776 /// # use google_cloud_video_stitcher_v1::model::GamLiveConfig;
2777 /// let x = GamLiveConfig::new().set_asset_key("example");
2778 /// ```
2779 pub fn set_asset_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2780 self.asset_key = v.into();
2781 self
2782 }
2783
2784 /// Sets the value of [custom_asset_key][crate::model::GamLiveConfig::custom_asset_key].
2785 ///
2786 /// # Example
2787 /// ```ignore,no_run
2788 /// # use google_cloud_video_stitcher_v1::model::GamLiveConfig;
2789 /// let x = GamLiveConfig::new().set_custom_asset_key("example");
2790 /// ```
2791 pub fn set_custom_asset_key<T: std::convert::Into<std::string::String>>(
2792 mut self,
2793 v: T,
2794 ) -> Self {
2795 self.custom_asset_key = v.into();
2796 self
2797 }
2798}
2799
2800impl wkt::message::Message for GamLiveConfig {
2801 fn typename() -> &'static str {
2802 "type.googleapis.com/google.cloud.video.stitcher.v1.GamLiveConfig"
2803 }
2804}
2805
2806/// Metadata for a VOD session. The session expires 4 hours after its creation.
2807#[derive(Clone, Default, PartialEq)]
2808#[non_exhaustive]
2809pub struct VodSession {
2810 /// Output only. The name of the VOD session, in the form of
2811 /// `projects/{project_number}/locations/{location}/vodSessions/{id}`.
2812 pub name: std::string::String,
2813
2814 /// Output only. Metadata of what was stitched into the content.
2815 pub interstitials: std::option::Option<crate::model::Interstitials>,
2816
2817 /// Output only. The playback URI of the stitched content.
2818 pub play_uri: std::string::String,
2819
2820 /// URI of the media to stitch. For most use cases, you should create a
2821 /// [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information
2822 /// rather than setting this field directly.
2823 ///
2824 /// [google.cloud.video.stitcher.v1.VodConfig]: crate::model::VodConfig
2825 pub source_uri: std::string::String,
2826
2827 /// Ad tag URI. For most use cases, you should create a
2828 /// [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information
2829 /// rather than setting this field directly.
2830 ///
2831 /// [google.cloud.video.stitcher.v1.VodConfig]: crate::model::VodConfig
2832 pub ad_tag_uri: std::string::String,
2833
2834 /// Key value pairs for ad tag macro replacement, only available for VOD
2835 /// sessions that do not implement Google Ad manager ad insertion. If the
2836 /// specified ad tag URI has macros, this field provides the mapping to the
2837 /// value that will replace the macro in the ad tag URI.
2838 ///
2839 /// Macros are designated by square brackets, for example:
2840 ///
2841 /// Ad tag URI: `"<https://doubleclick.google.com/ad/1?geo_id=>[geoId]"`
2842 ///
2843 /// Ad tag macro map: `{"geoId": "123"}`
2844 ///
2845 /// Fully qualified ad tag:
2846 /// ``https://doubleclick.google.com/ad/1?geo_id=123``
2847 pub ad_tag_macro_map: std::collections::HashMap<std::string::String, std::string::String>,
2848
2849 /// Additional options that affect the output of the manifest.
2850 pub manifest_options: std::option::Option<crate::model::ManifestOptions>,
2851
2852 /// Output only. The generated ID of the VodSession's source media.
2853 pub asset_id: std::string::String,
2854
2855 /// Required. Determines how the ad should be tracked.
2856 pub ad_tracking: crate::model::AdTracking,
2857
2858 /// This field should be set with appropriate values if GAM is being used for
2859 /// ads.
2860 pub gam_settings: std::option::Option<crate::model::vod_session::GamSettings>,
2861
2862 /// The resource name of the VOD config for this session, in the form of
2863 /// `projects/{project}/locations/{location}/vodConfigs/{id}`.
2864 pub vod_config: std::string::String,
2865
2866 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2867}
2868
2869impl VodSession {
2870 /// Creates a new default instance.
2871 pub fn new() -> Self {
2872 std::default::Default::default()
2873 }
2874
2875 /// Sets the value of [name][crate::model::VodSession::name].
2876 ///
2877 /// # Example
2878 /// ```ignore,no_run
2879 /// # use google_cloud_video_stitcher_v1::model::VodSession;
2880 /// # let project_id = "project_id";
2881 /// # let location_id = "location_id";
2882 /// # let vod_session_id = "vod_session_id";
2883 /// let x = VodSession::new().set_name(format!("projects/{project_id}/locations/{location_id}/vodSessions/{vod_session_id}"));
2884 /// ```
2885 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2886 self.name = v.into();
2887 self
2888 }
2889
2890 /// Sets the value of [interstitials][crate::model::VodSession::interstitials].
2891 ///
2892 /// # Example
2893 /// ```ignore,no_run
2894 /// # use google_cloud_video_stitcher_v1::model::VodSession;
2895 /// use google_cloud_video_stitcher_v1::model::Interstitials;
2896 /// let x = VodSession::new().set_interstitials(Interstitials::default()/* use setters */);
2897 /// ```
2898 pub fn set_interstitials<T>(mut self, v: T) -> Self
2899 where
2900 T: std::convert::Into<crate::model::Interstitials>,
2901 {
2902 self.interstitials = std::option::Option::Some(v.into());
2903 self
2904 }
2905
2906 /// Sets or clears the value of [interstitials][crate::model::VodSession::interstitials].
2907 ///
2908 /// # Example
2909 /// ```ignore,no_run
2910 /// # use google_cloud_video_stitcher_v1::model::VodSession;
2911 /// use google_cloud_video_stitcher_v1::model::Interstitials;
2912 /// let x = VodSession::new().set_or_clear_interstitials(Some(Interstitials::default()/* use setters */));
2913 /// let x = VodSession::new().set_or_clear_interstitials(None::<Interstitials>);
2914 /// ```
2915 pub fn set_or_clear_interstitials<T>(mut self, v: std::option::Option<T>) -> Self
2916 where
2917 T: std::convert::Into<crate::model::Interstitials>,
2918 {
2919 self.interstitials = v.map(|x| x.into());
2920 self
2921 }
2922
2923 /// Sets the value of [play_uri][crate::model::VodSession::play_uri].
2924 ///
2925 /// # Example
2926 /// ```ignore,no_run
2927 /// # use google_cloud_video_stitcher_v1::model::VodSession;
2928 /// let x = VodSession::new().set_play_uri("example");
2929 /// ```
2930 pub fn set_play_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2931 self.play_uri = v.into();
2932 self
2933 }
2934
2935 /// Sets the value of [source_uri][crate::model::VodSession::source_uri].
2936 ///
2937 /// # Example
2938 /// ```ignore,no_run
2939 /// # use google_cloud_video_stitcher_v1::model::VodSession;
2940 /// let x = VodSession::new().set_source_uri("example");
2941 /// ```
2942 pub fn set_source_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2943 self.source_uri = v.into();
2944 self
2945 }
2946
2947 /// Sets the value of [ad_tag_uri][crate::model::VodSession::ad_tag_uri].
2948 ///
2949 /// # Example
2950 /// ```ignore,no_run
2951 /// # use google_cloud_video_stitcher_v1::model::VodSession;
2952 /// let x = VodSession::new().set_ad_tag_uri("example");
2953 /// ```
2954 pub fn set_ad_tag_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2955 self.ad_tag_uri = v.into();
2956 self
2957 }
2958
2959 /// Sets the value of [ad_tag_macro_map][crate::model::VodSession::ad_tag_macro_map].
2960 ///
2961 /// # Example
2962 /// ```ignore,no_run
2963 /// # use google_cloud_video_stitcher_v1::model::VodSession;
2964 /// let x = VodSession::new().set_ad_tag_macro_map([
2965 /// ("key0", "abc"),
2966 /// ("key1", "xyz"),
2967 /// ]);
2968 /// ```
2969 pub fn set_ad_tag_macro_map<T, K, V>(mut self, v: T) -> Self
2970 where
2971 T: std::iter::IntoIterator<Item = (K, V)>,
2972 K: std::convert::Into<std::string::String>,
2973 V: std::convert::Into<std::string::String>,
2974 {
2975 use std::iter::Iterator;
2976 self.ad_tag_macro_map = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2977 self
2978 }
2979
2980 /// Sets the value of [manifest_options][crate::model::VodSession::manifest_options].
2981 ///
2982 /// # Example
2983 /// ```ignore,no_run
2984 /// # use google_cloud_video_stitcher_v1::model::VodSession;
2985 /// use google_cloud_video_stitcher_v1::model::ManifestOptions;
2986 /// let x = VodSession::new().set_manifest_options(ManifestOptions::default()/* use setters */);
2987 /// ```
2988 pub fn set_manifest_options<T>(mut self, v: T) -> Self
2989 where
2990 T: std::convert::Into<crate::model::ManifestOptions>,
2991 {
2992 self.manifest_options = std::option::Option::Some(v.into());
2993 self
2994 }
2995
2996 /// Sets or clears the value of [manifest_options][crate::model::VodSession::manifest_options].
2997 ///
2998 /// # Example
2999 /// ```ignore,no_run
3000 /// # use google_cloud_video_stitcher_v1::model::VodSession;
3001 /// use google_cloud_video_stitcher_v1::model::ManifestOptions;
3002 /// let x = VodSession::new().set_or_clear_manifest_options(Some(ManifestOptions::default()/* use setters */));
3003 /// let x = VodSession::new().set_or_clear_manifest_options(None::<ManifestOptions>);
3004 /// ```
3005 pub fn set_or_clear_manifest_options<T>(mut self, v: std::option::Option<T>) -> Self
3006 where
3007 T: std::convert::Into<crate::model::ManifestOptions>,
3008 {
3009 self.manifest_options = v.map(|x| x.into());
3010 self
3011 }
3012
3013 /// Sets the value of [asset_id][crate::model::VodSession::asset_id].
3014 ///
3015 /// # Example
3016 /// ```ignore,no_run
3017 /// # use google_cloud_video_stitcher_v1::model::VodSession;
3018 /// let x = VodSession::new().set_asset_id("example");
3019 /// ```
3020 pub fn set_asset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3021 self.asset_id = v.into();
3022 self
3023 }
3024
3025 /// Sets the value of [ad_tracking][crate::model::VodSession::ad_tracking].
3026 ///
3027 /// # Example
3028 /// ```ignore,no_run
3029 /// # use google_cloud_video_stitcher_v1::model::VodSession;
3030 /// use google_cloud_video_stitcher_v1::model::AdTracking;
3031 /// let x0 = VodSession::new().set_ad_tracking(AdTracking::Client);
3032 /// let x1 = VodSession::new().set_ad_tracking(AdTracking::Server);
3033 /// ```
3034 pub fn set_ad_tracking<T: std::convert::Into<crate::model::AdTracking>>(
3035 mut self,
3036 v: T,
3037 ) -> Self {
3038 self.ad_tracking = v.into();
3039 self
3040 }
3041
3042 /// Sets the value of [gam_settings][crate::model::VodSession::gam_settings].
3043 ///
3044 /// # Example
3045 /// ```ignore,no_run
3046 /// # use google_cloud_video_stitcher_v1::model::VodSession;
3047 /// use google_cloud_video_stitcher_v1::model::vod_session::GamSettings;
3048 /// let x = VodSession::new().set_gam_settings(GamSettings::default()/* use setters */);
3049 /// ```
3050 pub fn set_gam_settings<T>(mut self, v: T) -> Self
3051 where
3052 T: std::convert::Into<crate::model::vod_session::GamSettings>,
3053 {
3054 self.gam_settings = std::option::Option::Some(v.into());
3055 self
3056 }
3057
3058 /// Sets or clears the value of [gam_settings][crate::model::VodSession::gam_settings].
3059 ///
3060 /// # Example
3061 /// ```ignore,no_run
3062 /// # use google_cloud_video_stitcher_v1::model::VodSession;
3063 /// use google_cloud_video_stitcher_v1::model::vod_session::GamSettings;
3064 /// let x = VodSession::new().set_or_clear_gam_settings(Some(GamSettings::default()/* use setters */));
3065 /// let x = VodSession::new().set_or_clear_gam_settings(None::<GamSettings>);
3066 /// ```
3067 pub fn set_or_clear_gam_settings<T>(mut self, v: std::option::Option<T>) -> Self
3068 where
3069 T: std::convert::Into<crate::model::vod_session::GamSettings>,
3070 {
3071 self.gam_settings = v.map(|x| x.into());
3072 self
3073 }
3074
3075 /// Sets the value of [vod_config][crate::model::VodSession::vod_config].
3076 ///
3077 /// # Example
3078 /// ```ignore,no_run
3079 /// # use google_cloud_video_stitcher_v1::model::VodSession;
3080 /// # let project_id = "project_id";
3081 /// # let location_id = "location_id";
3082 /// # let vod_config_id = "vod_config_id";
3083 /// let x = VodSession::new().set_vod_config(format!("projects/{project_id}/locations/{location_id}/vodConfigs/{vod_config_id}"));
3084 /// ```
3085 pub fn set_vod_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3086 self.vod_config = v.into();
3087 self
3088 }
3089}
3090
3091impl wkt::message::Message for VodSession {
3092 fn typename() -> &'static str {
3093 "type.googleapis.com/google.cloud.video.stitcher.v1.VodSession"
3094 }
3095}
3096
3097/// Defines additional types related to [VodSession].
3098pub mod vod_session {
3099 #[allow(unused_imports)]
3100 use super::*;
3101
3102 /// Defines fields related to Google Ad Manager (GAM). This should be set if
3103 /// GAM is being used for ads.
3104 #[derive(Clone, Default, PartialEq)]
3105 #[non_exhaustive]
3106 pub struct GamSettings {
3107 /// Required. Ad Manager network code.
3108 pub network_code: std::string::String,
3109
3110 /// Required. The stream ID generated by Ad Manager.
3111 pub stream_id: std::string::String,
3112
3113 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3114 }
3115
3116 impl GamSettings {
3117 /// Creates a new default instance.
3118 pub fn new() -> Self {
3119 std::default::Default::default()
3120 }
3121
3122 /// Sets the value of [network_code][crate::model::vod_session::GamSettings::network_code].
3123 ///
3124 /// # Example
3125 /// ```ignore,no_run
3126 /// # use google_cloud_video_stitcher_v1::model::vod_session::GamSettings;
3127 /// let x = GamSettings::new().set_network_code("example");
3128 /// ```
3129 pub fn set_network_code<T: std::convert::Into<std::string::String>>(
3130 mut self,
3131 v: T,
3132 ) -> Self {
3133 self.network_code = v.into();
3134 self
3135 }
3136
3137 /// Sets the value of [stream_id][crate::model::vod_session::GamSettings::stream_id].
3138 ///
3139 /// # Example
3140 /// ```ignore,no_run
3141 /// # use google_cloud_video_stitcher_v1::model::vod_session::GamSettings;
3142 /// let x = GamSettings::new().set_stream_id("example");
3143 /// ```
3144 pub fn set_stream_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3145 self.stream_id = v.into();
3146 self
3147 }
3148 }
3149
3150 impl wkt::message::Message for GamSettings {
3151 fn typename() -> &'static str {
3152 "type.googleapis.com/google.cloud.video.stitcher.v1.VodSession.GamSettings"
3153 }
3154 }
3155}
3156
3157/// Describes what was stitched into a VOD session's manifest.
3158#[derive(Clone, Default, PartialEq)]
3159#[non_exhaustive]
3160pub struct Interstitials {
3161 /// List of ad breaks ordered by time.
3162 pub ad_breaks: std::vec::Vec<crate::model::VodSessionAdBreak>,
3163
3164 /// Information related to the content of the VOD session.
3165 pub session_content: std::option::Option<crate::model::VodSessionContent>,
3166
3167 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3168}
3169
3170impl Interstitials {
3171 /// Creates a new default instance.
3172 pub fn new() -> Self {
3173 std::default::Default::default()
3174 }
3175
3176 /// Sets the value of [ad_breaks][crate::model::Interstitials::ad_breaks].
3177 ///
3178 /// # Example
3179 /// ```ignore,no_run
3180 /// # use google_cloud_video_stitcher_v1::model::Interstitials;
3181 /// use google_cloud_video_stitcher_v1::model::VodSessionAdBreak;
3182 /// let x = Interstitials::new()
3183 /// .set_ad_breaks([
3184 /// VodSessionAdBreak::default()/* use setters */,
3185 /// VodSessionAdBreak::default()/* use (different) setters */,
3186 /// ]);
3187 /// ```
3188 pub fn set_ad_breaks<T, V>(mut self, v: T) -> Self
3189 where
3190 T: std::iter::IntoIterator<Item = V>,
3191 V: std::convert::Into<crate::model::VodSessionAdBreak>,
3192 {
3193 use std::iter::Iterator;
3194 self.ad_breaks = v.into_iter().map(|i| i.into()).collect();
3195 self
3196 }
3197
3198 /// Sets the value of [session_content][crate::model::Interstitials::session_content].
3199 ///
3200 /// # Example
3201 /// ```ignore,no_run
3202 /// # use google_cloud_video_stitcher_v1::model::Interstitials;
3203 /// use google_cloud_video_stitcher_v1::model::VodSessionContent;
3204 /// let x = Interstitials::new().set_session_content(VodSessionContent::default()/* use setters */);
3205 /// ```
3206 pub fn set_session_content<T>(mut self, v: T) -> Self
3207 where
3208 T: std::convert::Into<crate::model::VodSessionContent>,
3209 {
3210 self.session_content = std::option::Option::Some(v.into());
3211 self
3212 }
3213
3214 /// Sets or clears the value of [session_content][crate::model::Interstitials::session_content].
3215 ///
3216 /// # Example
3217 /// ```ignore,no_run
3218 /// # use google_cloud_video_stitcher_v1::model::Interstitials;
3219 /// use google_cloud_video_stitcher_v1::model::VodSessionContent;
3220 /// let x = Interstitials::new().set_or_clear_session_content(Some(VodSessionContent::default()/* use setters */));
3221 /// let x = Interstitials::new().set_or_clear_session_content(None::<VodSessionContent>);
3222 /// ```
3223 pub fn set_or_clear_session_content<T>(mut self, v: std::option::Option<T>) -> Self
3224 where
3225 T: std::convert::Into<crate::model::VodSessionContent>,
3226 {
3227 self.session_content = v.map(|x| x.into());
3228 self
3229 }
3230}
3231
3232impl wkt::message::Message for Interstitials {
3233 fn typename() -> &'static str {
3234 "type.googleapis.com/google.cloud.video.stitcher.v1.Interstitials"
3235 }
3236}
3237
3238/// Metadata for an inserted ad in a VOD session.
3239#[derive(Clone, Default, PartialEq)]
3240#[non_exhaustive]
3241pub struct VodSessionAd {
3242 /// Duration in seconds of the ad.
3243 pub duration: std::option::Option<wkt::Duration>,
3244
3245 /// Metadata of companion ads associated with the ad.
3246 pub companion_ads: std::option::Option<crate::model::CompanionAds>,
3247
3248 /// The list of progress tracking events for the ad break. These can be of
3249 /// the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`,
3250 /// `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`,
3251 /// `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`,
3252 /// `CLOSE_LINEAR`, `SKIP`.
3253 pub activity_events: std::vec::Vec<crate::model::Event>,
3254
3255 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3256}
3257
3258impl VodSessionAd {
3259 /// Creates a new default instance.
3260 pub fn new() -> Self {
3261 std::default::Default::default()
3262 }
3263
3264 /// Sets the value of [duration][crate::model::VodSessionAd::duration].
3265 ///
3266 /// # Example
3267 /// ```ignore,no_run
3268 /// # use google_cloud_video_stitcher_v1::model::VodSessionAd;
3269 /// use wkt::Duration;
3270 /// let x = VodSessionAd::new().set_duration(Duration::default()/* use setters */);
3271 /// ```
3272 pub fn set_duration<T>(mut self, v: T) -> Self
3273 where
3274 T: std::convert::Into<wkt::Duration>,
3275 {
3276 self.duration = std::option::Option::Some(v.into());
3277 self
3278 }
3279
3280 /// Sets or clears the value of [duration][crate::model::VodSessionAd::duration].
3281 ///
3282 /// # Example
3283 /// ```ignore,no_run
3284 /// # use google_cloud_video_stitcher_v1::model::VodSessionAd;
3285 /// use wkt::Duration;
3286 /// let x = VodSessionAd::new().set_or_clear_duration(Some(Duration::default()/* use setters */));
3287 /// let x = VodSessionAd::new().set_or_clear_duration(None::<Duration>);
3288 /// ```
3289 pub fn set_or_clear_duration<T>(mut self, v: std::option::Option<T>) -> Self
3290 where
3291 T: std::convert::Into<wkt::Duration>,
3292 {
3293 self.duration = v.map(|x| x.into());
3294 self
3295 }
3296
3297 /// Sets the value of [companion_ads][crate::model::VodSessionAd::companion_ads].
3298 ///
3299 /// # Example
3300 /// ```ignore,no_run
3301 /// # use google_cloud_video_stitcher_v1::model::VodSessionAd;
3302 /// use google_cloud_video_stitcher_v1::model::CompanionAds;
3303 /// let x = VodSessionAd::new().set_companion_ads(CompanionAds::default()/* use setters */);
3304 /// ```
3305 pub fn set_companion_ads<T>(mut self, v: T) -> Self
3306 where
3307 T: std::convert::Into<crate::model::CompanionAds>,
3308 {
3309 self.companion_ads = std::option::Option::Some(v.into());
3310 self
3311 }
3312
3313 /// Sets or clears the value of [companion_ads][crate::model::VodSessionAd::companion_ads].
3314 ///
3315 /// # Example
3316 /// ```ignore,no_run
3317 /// # use google_cloud_video_stitcher_v1::model::VodSessionAd;
3318 /// use google_cloud_video_stitcher_v1::model::CompanionAds;
3319 /// let x = VodSessionAd::new().set_or_clear_companion_ads(Some(CompanionAds::default()/* use setters */));
3320 /// let x = VodSessionAd::new().set_or_clear_companion_ads(None::<CompanionAds>);
3321 /// ```
3322 pub fn set_or_clear_companion_ads<T>(mut self, v: std::option::Option<T>) -> Self
3323 where
3324 T: std::convert::Into<crate::model::CompanionAds>,
3325 {
3326 self.companion_ads = v.map(|x| x.into());
3327 self
3328 }
3329
3330 /// Sets the value of [activity_events][crate::model::VodSessionAd::activity_events].
3331 ///
3332 /// # Example
3333 /// ```ignore,no_run
3334 /// # use google_cloud_video_stitcher_v1::model::VodSessionAd;
3335 /// use google_cloud_video_stitcher_v1::model::Event;
3336 /// let x = VodSessionAd::new()
3337 /// .set_activity_events([
3338 /// Event::default()/* use setters */,
3339 /// Event::default()/* use (different) setters */,
3340 /// ]);
3341 /// ```
3342 pub fn set_activity_events<T, V>(mut self, v: T) -> Self
3343 where
3344 T: std::iter::IntoIterator<Item = V>,
3345 V: std::convert::Into<crate::model::Event>,
3346 {
3347 use std::iter::Iterator;
3348 self.activity_events = v.into_iter().map(|i| i.into()).collect();
3349 self
3350 }
3351}
3352
3353impl wkt::message::Message for VodSessionAd {
3354 fn typename() -> &'static str {
3355 "type.googleapis.com/google.cloud.video.stitcher.v1.VodSessionAd"
3356 }
3357}
3358
3359/// Metadata for the entire stitched content in a VOD session.
3360#[derive(Clone, Default, PartialEq)]
3361#[non_exhaustive]
3362pub struct VodSessionContent {
3363 /// The total duration in seconds of the content including the ads stitched
3364 /// in.
3365 pub duration: std::option::Option<wkt::Duration>,
3366
3367 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3368}
3369
3370impl VodSessionContent {
3371 /// Creates a new default instance.
3372 pub fn new() -> Self {
3373 std::default::Default::default()
3374 }
3375
3376 /// Sets the value of [duration][crate::model::VodSessionContent::duration].
3377 ///
3378 /// # Example
3379 /// ```ignore,no_run
3380 /// # use google_cloud_video_stitcher_v1::model::VodSessionContent;
3381 /// use wkt::Duration;
3382 /// let x = VodSessionContent::new().set_duration(Duration::default()/* use setters */);
3383 /// ```
3384 pub fn set_duration<T>(mut self, v: T) -> Self
3385 where
3386 T: std::convert::Into<wkt::Duration>,
3387 {
3388 self.duration = std::option::Option::Some(v.into());
3389 self
3390 }
3391
3392 /// Sets or clears the value of [duration][crate::model::VodSessionContent::duration].
3393 ///
3394 /// # Example
3395 /// ```ignore,no_run
3396 /// # use google_cloud_video_stitcher_v1::model::VodSessionContent;
3397 /// use wkt::Duration;
3398 /// let x = VodSessionContent::new().set_or_clear_duration(Some(Duration::default()/* use setters */));
3399 /// let x = VodSessionContent::new().set_or_clear_duration(None::<Duration>);
3400 /// ```
3401 pub fn set_or_clear_duration<T>(mut self, v: std::option::Option<T>) -> Self
3402 where
3403 T: std::convert::Into<wkt::Duration>,
3404 {
3405 self.duration = v.map(|x| x.into());
3406 self
3407 }
3408}
3409
3410impl wkt::message::Message for VodSessionContent {
3411 fn typename() -> &'static str {
3412 "type.googleapis.com/google.cloud.video.stitcher.v1.VodSessionContent"
3413 }
3414}
3415
3416/// Metadata for an inserted ad break.
3417#[derive(Clone, Default, PartialEq)]
3418#[non_exhaustive]
3419pub struct VodSessionAdBreak {
3420 /// List of events that are expected to be triggered, ordered by time.
3421 pub progress_events: std::vec::Vec<crate::model::ProgressEvent>,
3422
3423 /// Ordered list of ads stitched into the ad break.
3424 pub ads: std::vec::Vec<crate::model::VodSessionAd>,
3425
3426 /// Ad break end time in seconds relative to the start of the VOD asset.
3427 pub end_time_offset: std::option::Option<wkt::Duration>,
3428
3429 /// Ad break start time in seconds relative to the start of the VOD asset.
3430 pub start_time_offset: std::option::Option<wkt::Duration>,
3431
3432 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3433}
3434
3435impl VodSessionAdBreak {
3436 /// Creates a new default instance.
3437 pub fn new() -> Self {
3438 std::default::Default::default()
3439 }
3440
3441 /// Sets the value of [progress_events][crate::model::VodSessionAdBreak::progress_events].
3442 ///
3443 /// # Example
3444 /// ```ignore,no_run
3445 /// # use google_cloud_video_stitcher_v1::model::VodSessionAdBreak;
3446 /// use google_cloud_video_stitcher_v1::model::ProgressEvent;
3447 /// let x = VodSessionAdBreak::new()
3448 /// .set_progress_events([
3449 /// ProgressEvent::default()/* use setters */,
3450 /// ProgressEvent::default()/* use (different) setters */,
3451 /// ]);
3452 /// ```
3453 pub fn set_progress_events<T, V>(mut self, v: T) -> Self
3454 where
3455 T: std::iter::IntoIterator<Item = V>,
3456 V: std::convert::Into<crate::model::ProgressEvent>,
3457 {
3458 use std::iter::Iterator;
3459 self.progress_events = v.into_iter().map(|i| i.into()).collect();
3460 self
3461 }
3462
3463 /// Sets the value of [ads][crate::model::VodSessionAdBreak::ads].
3464 ///
3465 /// # Example
3466 /// ```ignore,no_run
3467 /// # use google_cloud_video_stitcher_v1::model::VodSessionAdBreak;
3468 /// use google_cloud_video_stitcher_v1::model::VodSessionAd;
3469 /// let x = VodSessionAdBreak::new()
3470 /// .set_ads([
3471 /// VodSessionAd::default()/* use setters */,
3472 /// VodSessionAd::default()/* use (different) setters */,
3473 /// ]);
3474 /// ```
3475 pub fn set_ads<T, V>(mut self, v: T) -> Self
3476 where
3477 T: std::iter::IntoIterator<Item = V>,
3478 V: std::convert::Into<crate::model::VodSessionAd>,
3479 {
3480 use std::iter::Iterator;
3481 self.ads = v.into_iter().map(|i| i.into()).collect();
3482 self
3483 }
3484
3485 /// Sets the value of [end_time_offset][crate::model::VodSessionAdBreak::end_time_offset].
3486 ///
3487 /// # Example
3488 /// ```ignore,no_run
3489 /// # use google_cloud_video_stitcher_v1::model::VodSessionAdBreak;
3490 /// use wkt::Duration;
3491 /// let x = VodSessionAdBreak::new().set_end_time_offset(Duration::default()/* use setters */);
3492 /// ```
3493 pub fn set_end_time_offset<T>(mut self, v: T) -> Self
3494 where
3495 T: std::convert::Into<wkt::Duration>,
3496 {
3497 self.end_time_offset = std::option::Option::Some(v.into());
3498 self
3499 }
3500
3501 /// Sets or clears the value of [end_time_offset][crate::model::VodSessionAdBreak::end_time_offset].
3502 ///
3503 /// # Example
3504 /// ```ignore,no_run
3505 /// # use google_cloud_video_stitcher_v1::model::VodSessionAdBreak;
3506 /// use wkt::Duration;
3507 /// let x = VodSessionAdBreak::new().set_or_clear_end_time_offset(Some(Duration::default()/* use setters */));
3508 /// let x = VodSessionAdBreak::new().set_or_clear_end_time_offset(None::<Duration>);
3509 /// ```
3510 pub fn set_or_clear_end_time_offset<T>(mut self, v: std::option::Option<T>) -> Self
3511 where
3512 T: std::convert::Into<wkt::Duration>,
3513 {
3514 self.end_time_offset = v.map(|x| x.into());
3515 self
3516 }
3517
3518 /// Sets the value of [start_time_offset][crate::model::VodSessionAdBreak::start_time_offset].
3519 ///
3520 /// # Example
3521 /// ```ignore,no_run
3522 /// # use google_cloud_video_stitcher_v1::model::VodSessionAdBreak;
3523 /// use wkt::Duration;
3524 /// let x = VodSessionAdBreak::new().set_start_time_offset(Duration::default()/* use setters */);
3525 /// ```
3526 pub fn set_start_time_offset<T>(mut self, v: T) -> Self
3527 where
3528 T: std::convert::Into<wkt::Duration>,
3529 {
3530 self.start_time_offset = std::option::Option::Some(v.into());
3531 self
3532 }
3533
3534 /// Sets or clears the value of [start_time_offset][crate::model::VodSessionAdBreak::start_time_offset].
3535 ///
3536 /// # Example
3537 /// ```ignore,no_run
3538 /// # use google_cloud_video_stitcher_v1::model::VodSessionAdBreak;
3539 /// use wkt::Duration;
3540 /// let x = VodSessionAdBreak::new().set_or_clear_start_time_offset(Some(Duration::default()/* use setters */));
3541 /// let x = VodSessionAdBreak::new().set_or_clear_start_time_offset(None::<Duration>);
3542 /// ```
3543 pub fn set_or_clear_start_time_offset<T>(mut self, v: std::option::Option<T>) -> Self
3544 where
3545 T: std::convert::Into<wkt::Duration>,
3546 {
3547 self.start_time_offset = v.map(|x| x.into());
3548 self
3549 }
3550}
3551
3552impl wkt::message::Message for VodSessionAdBreak {
3553 fn typename() -> &'static str {
3554 "type.googleapis.com/google.cloud.video.stitcher.v1.VodSessionAdBreak"
3555 }
3556}
3557
3558/// Metadata for a live session. The session expires 5 minutes after the client
3559/// stops fetching the session's playlists.
3560#[derive(Clone, Default, PartialEq)]
3561#[non_exhaustive]
3562pub struct LiveSession {
3563 /// Output only. The name of the live session, in the form of
3564 /// `projects/{project}/locations/{location}/liveSessions/{id}`.
3565 pub name: std::string::String,
3566
3567 /// Output only. The URI to play the live session's ad-stitched stream.
3568 pub play_uri: std::string::String,
3569
3570 /// Key value pairs for ad tag macro replacement, only available for live
3571 /// sessions that do not implement Google Ad manager ad insertion. If the
3572 /// specified ad tag URI has macros, this field provides the mapping to the
3573 /// value that will replace the macro in the ad tag URI.
3574 ///
3575 /// Macros are designated by square brackets, for example:
3576 ///
3577 /// Ad tag URI: "<https://doubleclick.google.com/ad/1?geo_id=>[geoId]"
3578 ///
3579 /// Ad tag macros: `{"geoId": "123"}`
3580 ///
3581 /// Fully qualified ad tag:
3582 /// ``https://doubleclick.google.com/ad/1?geo_id=123``
3583 pub ad_tag_macros: std::collections::HashMap<std::string::String, std::string::String>,
3584
3585 /// Additional options that affect the output of the manifest.
3586 pub manifest_options: std::option::Option<crate::model::ManifestOptions>,
3587
3588 /// This field should be set with appropriate values if GAM is being used for
3589 /// ads.
3590 pub gam_settings: std::option::Option<crate::model::live_session::GamSettings>,
3591
3592 /// Required. The resource name of the live config for this session, in the
3593 /// form of `projects/{project}/locations/{location}/liveConfigs/{id}`.
3594 pub live_config: std::string::String,
3595
3596 /// Determines how the ad should be tracked. This overrides the value set in
3597 /// the live config for this session.
3598 pub ad_tracking: crate::model::AdTracking,
3599
3600 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3601}
3602
3603impl LiveSession {
3604 /// Creates a new default instance.
3605 pub fn new() -> Self {
3606 std::default::Default::default()
3607 }
3608
3609 /// Sets the value of [name][crate::model::LiveSession::name].
3610 ///
3611 /// # Example
3612 /// ```ignore,no_run
3613 /// # use google_cloud_video_stitcher_v1::model::LiveSession;
3614 /// # let project_id = "project_id";
3615 /// # let location_id = "location_id";
3616 /// # let live_session_id = "live_session_id";
3617 /// let x = LiveSession::new().set_name(format!("projects/{project_id}/locations/{location_id}/liveSessions/{live_session_id}"));
3618 /// ```
3619 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3620 self.name = v.into();
3621 self
3622 }
3623
3624 /// Sets the value of [play_uri][crate::model::LiveSession::play_uri].
3625 ///
3626 /// # Example
3627 /// ```ignore,no_run
3628 /// # use google_cloud_video_stitcher_v1::model::LiveSession;
3629 /// let x = LiveSession::new().set_play_uri("example");
3630 /// ```
3631 pub fn set_play_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3632 self.play_uri = v.into();
3633 self
3634 }
3635
3636 /// Sets the value of [ad_tag_macros][crate::model::LiveSession::ad_tag_macros].
3637 ///
3638 /// # Example
3639 /// ```ignore,no_run
3640 /// # use google_cloud_video_stitcher_v1::model::LiveSession;
3641 /// let x = LiveSession::new().set_ad_tag_macros([
3642 /// ("key0", "abc"),
3643 /// ("key1", "xyz"),
3644 /// ]);
3645 /// ```
3646 pub fn set_ad_tag_macros<T, K, V>(mut self, v: T) -> Self
3647 where
3648 T: std::iter::IntoIterator<Item = (K, V)>,
3649 K: std::convert::Into<std::string::String>,
3650 V: std::convert::Into<std::string::String>,
3651 {
3652 use std::iter::Iterator;
3653 self.ad_tag_macros = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3654 self
3655 }
3656
3657 /// Sets the value of [manifest_options][crate::model::LiveSession::manifest_options].
3658 ///
3659 /// # Example
3660 /// ```ignore,no_run
3661 /// # use google_cloud_video_stitcher_v1::model::LiveSession;
3662 /// use google_cloud_video_stitcher_v1::model::ManifestOptions;
3663 /// let x = LiveSession::new().set_manifest_options(ManifestOptions::default()/* use setters */);
3664 /// ```
3665 pub fn set_manifest_options<T>(mut self, v: T) -> Self
3666 where
3667 T: std::convert::Into<crate::model::ManifestOptions>,
3668 {
3669 self.manifest_options = std::option::Option::Some(v.into());
3670 self
3671 }
3672
3673 /// Sets or clears the value of [manifest_options][crate::model::LiveSession::manifest_options].
3674 ///
3675 /// # Example
3676 /// ```ignore,no_run
3677 /// # use google_cloud_video_stitcher_v1::model::LiveSession;
3678 /// use google_cloud_video_stitcher_v1::model::ManifestOptions;
3679 /// let x = LiveSession::new().set_or_clear_manifest_options(Some(ManifestOptions::default()/* use setters */));
3680 /// let x = LiveSession::new().set_or_clear_manifest_options(None::<ManifestOptions>);
3681 /// ```
3682 pub fn set_or_clear_manifest_options<T>(mut self, v: std::option::Option<T>) -> Self
3683 where
3684 T: std::convert::Into<crate::model::ManifestOptions>,
3685 {
3686 self.manifest_options = v.map(|x| x.into());
3687 self
3688 }
3689
3690 /// Sets the value of [gam_settings][crate::model::LiveSession::gam_settings].
3691 ///
3692 /// # Example
3693 /// ```ignore,no_run
3694 /// # use google_cloud_video_stitcher_v1::model::LiveSession;
3695 /// use google_cloud_video_stitcher_v1::model::live_session::GamSettings;
3696 /// let x = LiveSession::new().set_gam_settings(GamSettings::default()/* use setters */);
3697 /// ```
3698 pub fn set_gam_settings<T>(mut self, v: T) -> Self
3699 where
3700 T: std::convert::Into<crate::model::live_session::GamSettings>,
3701 {
3702 self.gam_settings = std::option::Option::Some(v.into());
3703 self
3704 }
3705
3706 /// Sets or clears the value of [gam_settings][crate::model::LiveSession::gam_settings].
3707 ///
3708 /// # Example
3709 /// ```ignore,no_run
3710 /// # use google_cloud_video_stitcher_v1::model::LiveSession;
3711 /// use google_cloud_video_stitcher_v1::model::live_session::GamSettings;
3712 /// let x = LiveSession::new().set_or_clear_gam_settings(Some(GamSettings::default()/* use setters */));
3713 /// let x = LiveSession::new().set_or_clear_gam_settings(None::<GamSettings>);
3714 /// ```
3715 pub fn set_or_clear_gam_settings<T>(mut self, v: std::option::Option<T>) -> Self
3716 where
3717 T: std::convert::Into<crate::model::live_session::GamSettings>,
3718 {
3719 self.gam_settings = v.map(|x| x.into());
3720 self
3721 }
3722
3723 /// Sets the value of [live_config][crate::model::LiveSession::live_config].
3724 ///
3725 /// # Example
3726 /// ```ignore,no_run
3727 /// # use google_cloud_video_stitcher_v1::model::LiveSession;
3728 /// # let project_id = "project_id";
3729 /// # let location_id = "location_id";
3730 /// # let live_config_id = "live_config_id";
3731 /// let x = LiveSession::new().set_live_config(format!("projects/{project_id}/locations/{location_id}/liveConfigs/{live_config_id}"));
3732 /// ```
3733 pub fn set_live_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3734 self.live_config = v.into();
3735 self
3736 }
3737
3738 /// Sets the value of [ad_tracking][crate::model::LiveSession::ad_tracking].
3739 ///
3740 /// # Example
3741 /// ```ignore,no_run
3742 /// # use google_cloud_video_stitcher_v1::model::LiveSession;
3743 /// use google_cloud_video_stitcher_v1::model::AdTracking;
3744 /// let x0 = LiveSession::new().set_ad_tracking(AdTracking::Client);
3745 /// let x1 = LiveSession::new().set_ad_tracking(AdTracking::Server);
3746 /// ```
3747 pub fn set_ad_tracking<T: std::convert::Into<crate::model::AdTracking>>(
3748 mut self,
3749 v: T,
3750 ) -> Self {
3751 self.ad_tracking = v.into();
3752 self
3753 }
3754}
3755
3756impl wkt::message::Message for LiveSession {
3757 fn typename() -> &'static str {
3758 "type.googleapis.com/google.cloud.video.stitcher.v1.LiveSession"
3759 }
3760}
3761
3762/// Defines additional types related to [LiveSession].
3763pub mod live_session {
3764 #[allow(unused_imports)]
3765 use super::*;
3766
3767 /// Defines fields related to Google Ad Manager (GAM).
3768 #[derive(Clone, Default, PartialEq)]
3769 #[non_exhaustive]
3770 pub struct GamSettings {
3771 /// Required. The stream ID generated by Ad Manager. This must be set if GAM
3772 /// is being used for ads and the session uses client-side ad tracking.
3773 pub stream_id: std::string::String,
3774
3775 /// [Targeting
3776 /// parameters](https://support.google.com/admanager/answer/7320899) to send
3777 /// to Ad Manager to generate a stream ID. This should only be set if the
3778 /// session uses server-side ad tracking.
3779 pub targeting_parameters:
3780 std::collections::HashMap<std::string::String, std::string::String>,
3781
3782 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3783 }
3784
3785 impl GamSettings {
3786 /// Creates a new default instance.
3787 pub fn new() -> Self {
3788 std::default::Default::default()
3789 }
3790
3791 /// Sets the value of [stream_id][crate::model::live_session::GamSettings::stream_id].
3792 ///
3793 /// # Example
3794 /// ```ignore,no_run
3795 /// # use google_cloud_video_stitcher_v1::model::live_session::GamSettings;
3796 /// let x = GamSettings::new().set_stream_id("example");
3797 /// ```
3798 pub fn set_stream_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3799 self.stream_id = v.into();
3800 self
3801 }
3802
3803 /// Sets the value of [targeting_parameters][crate::model::live_session::GamSettings::targeting_parameters].
3804 ///
3805 /// # Example
3806 /// ```ignore,no_run
3807 /// # use google_cloud_video_stitcher_v1::model::live_session::GamSettings;
3808 /// let x = GamSettings::new().set_targeting_parameters([
3809 /// ("key0", "abc"),
3810 /// ("key1", "xyz"),
3811 /// ]);
3812 /// ```
3813 pub fn set_targeting_parameters<T, K, V>(mut self, v: T) -> Self
3814 where
3815 T: std::iter::IntoIterator<Item = (K, V)>,
3816 K: std::convert::Into<std::string::String>,
3817 V: std::convert::Into<std::string::String>,
3818 {
3819 use std::iter::Iterator;
3820 self.targeting_parameters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3821 self
3822 }
3823 }
3824
3825 impl wkt::message::Message for GamSettings {
3826 fn typename() -> &'static str {
3827 "type.googleapis.com/google.cloud.video.stitcher.v1.LiveSession.GamSettings"
3828 }
3829 }
3830}
3831
3832/// Options for manifest generation.
3833#[derive(Clone, Default, PartialEq)]
3834#[non_exhaustive]
3835pub struct ManifestOptions {
3836 /// If specified, the output manifest will only return renditions matching the
3837 /// specified filters.
3838 pub include_renditions: std::vec::Vec<crate::model::RenditionFilter>,
3839
3840 /// If specified, the output manifest will orders the video and muxed
3841 /// renditions by bitrate according to the ordering policy.
3842 pub bitrate_order: crate::model::manifest_options::OrderPolicy,
3843
3844 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3845}
3846
3847impl ManifestOptions {
3848 /// Creates a new default instance.
3849 pub fn new() -> Self {
3850 std::default::Default::default()
3851 }
3852
3853 /// Sets the value of [include_renditions][crate::model::ManifestOptions::include_renditions].
3854 ///
3855 /// # Example
3856 /// ```ignore,no_run
3857 /// # use google_cloud_video_stitcher_v1::model::ManifestOptions;
3858 /// use google_cloud_video_stitcher_v1::model::RenditionFilter;
3859 /// let x = ManifestOptions::new()
3860 /// .set_include_renditions([
3861 /// RenditionFilter::default()/* use setters */,
3862 /// RenditionFilter::default()/* use (different) setters */,
3863 /// ]);
3864 /// ```
3865 pub fn set_include_renditions<T, V>(mut self, v: T) -> Self
3866 where
3867 T: std::iter::IntoIterator<Item = V>,
3868 V: std::convert::Into<crate::model::RenditionFilter>,
3869 {
3870 use std::iter::Iterator;
3871 self.include_renditions = v.into_iter().map(|i| i.into()).collect();
3872 self
3873 }
3874
3875 /// Sets the value of [bitrate_order][crate::model::ManifestOptions::bitrate_order].
3876 ///
3877 /// # Example
3878 /// ```ignore,no_run
3879 /// # use google_cloud_video_stitcher_v1::model::ManifestOptions;
3880 /// use google_cloud_video_stitcher_v1::model::manifest_options::OrderPolicy;
3881 /// let x0 = ManifestOptions::new().set_bitrate_order(OrderPolicy::Ascending);
3882 /// let x1 = ManifestOptions::new().set_bitrate_order(OrderPolicy::Descending);
3883 /// ```
3884 pub fn set_bitrate_order<T: std::convert::Into<crate::model::manifest_options::OrderPolicy>>(
3885 mut self,
3886 v: T,
3887 ) -> Self {
3888 self.bitrate_order = v.into();
3889 self
3890 }
3891}
3892
3893impl wkt::message::Message for ManifestOptions {
3894 fn typename() -> &'static str {
3895 "type.googleapis.com/google.cloud.video.stitcher.v1.ManifestOptions"
3896 }
3897}
3898
3899/// Defines additional types related to [ManifestOptions].
3900pub mod manifest_options {
3901 #[allow(unused_imports)]
3902 use super::*;
3903
3904 /// Defines the ordering policy during manifest generation.
3905 ///
3906 /// # Working with unknown values
3907 ///
3908 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3909 /// additional enum variants at any time. Adding new variants is not considered
3910 /// a breaking change. Applications should write their code in anticipation of:
3911 ///
3912 /// - New values appearing in future releases of the client library, **and**
3913 /// - New values received dynamically, without application changes.
3914 ///
3915 /// Please consult the [Working with enums] section in the user guide for some
3916 /// guidelines.
3917 ///
3918 /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3919 #[derive(Clone, Debug, PartialEq)]
3920 #[non_exhaustive]
3921 pub enum OrderPolicy {
3922 /// Ordering policy is not specified.
3923 Unspecified,
3924 /// Order by ascending.
3925 Ascending,
3926 /// Order by descending.
3927 Descending,
3928 /// If set, the enum was initialized with an unknown value.
3929 ///
3930 /// Applications can examine the value using [OrderPolicy::value] or
3931 /// [OrderPolicy::name].
3932 UnknownValue(order_policy::UnknownValue),
3933 }
3934
3935 #[doc(hidden)]
3936 pub mod order_policy {
3937 #[allow(unused_imports)]
3938 use super::*;
3939 #[derive(Clone, Debug, PartialEq)]
3940 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3941 }
3942
3943 impl OrderPolicy {
3944 /// Gets the enum value.
3945 ///
3946 /// Returns `None` if the enum contains an unknown value deserialized from
3947 /// the string representation of enums.
3948 pub fn value(&self) -> std::option::Option<i32> {
3949 match self {
3950 Self::Unspecified => std::option::Option::Some(0),
3951 Self::Ascending => std::option::Option::Some(1),
3952 Self::Descending => std::option::Option::Some(2),
3953 Self::UnknownValue(u) => u.0.value(),
3954 }
3955 }
3956
3957 /// Gets the enum value as a string.
3958 ///
3959 /// Returns `None` if the enum contains an unknown value deserialized from
3960 /// the integer representation of enums.
3961 pub fn name(&self) -> std::option::Option<&str> {
3962 match self {
3963 Self::Unspecified => std::option::Option::Some("ORDER_POLICY_UNSPECIFIED"),
3964 Self::Ascending => std::option::Option::Some("ASCENDING"),
3965 Self::Descending => std::option::Option::Some("DESCENDING"),
3966 Self::UnknownValue(u) => u.0.name(),
3967 }
3968 }
3969 }
3970
3971 impl std::default::Default for OrderPolicy {
3972 fn default() -> Self {
3973 use std::convert::From;
3974 Self::from(0)
3975 }
3976 }
3977
3978 impl std::fmt::Display for OrderPolicy {
3979 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3980 wkt::internal::display_enum(f, self.name(), self.value())
3981 }
3982 }
3983
3984 impl std::convert::From<i32> for OrderPolicy {
3985 fn from(value: i32) -> Self {
3986 match value {
3987 0 => Self::Unspecified,
3988 1 => Self::Ascending,
3989 2 => Self::Descending,
3990 _ => Self::UnknownValue(order_policy::UnknownValue(
3991 wkt::internal::UnknownEnumValue::Integer(value),
3992 )),
3993 }
3994 }
3995 }
3996
3997 impl std::convert::From<&str> for OrderPolicy {
3998 fn from(value: &str) -> Self {
3999 use std::string::ToString;
4000 match value {
4001 "ORDER_POLICY_UNSPECIFIED" => Self::Unspecified,
4002 "ASCENDING" => Self::Ascending,
4003 "DESCENDING" => Self::Descending,
4004 _ => Self::UnknownValue(order_policy::UnknownValue(
4005 wkt::internal::UnknownEnumValue::String(value.to_string()),
4006 )),
4007 }
4008 }
4009 }
4010
4011 impl serde::ser::Serialize for OrderPolicy {
4012 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4013 where
4014 S: serde::Serializer,
4015 {
4016 match self {
4017 Self::Unspecified => serializer.serialize_i32(0),
4018 Self::Ascending => serializer.serialize_i32(1),
4019 Self::Descending => serializer.serialize_i32(2),
4020 Self::UnknownValue(u) => u.0.serialize(serializer),
4021 }
4022 }
4023 }
4024
4025 impl<'de> serde::de::Deserialize<'de> for OrderPolicy {
4026 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4027 where
4028 D: serde::Deserializer<'de>,
4029 {
4030 deserializer.deserialize_any(wkt::internal::EnumVisitor::<OrderPolicy>::new(
4031 ".google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy",
4032 ))
4033 }
4034 }
4035}
4036
4037/// Filters for a video or muxed redition.
4038#[derive(Clone, Default, PartialEq)]
4039#[non_exhaustive]
4040pub struct RenditionFilter {
4041 /// Bitrate in bits per second for the rendition. If set, only renditions with
4042 /// the exact bitrate will match.
4043 pub bitrate_bps: i32,
4044
4045 /// Codecs for the rendition. If set, only renditions with the exact value
4046 /// will match.
4047 pub codecs: std::string::String,
4048
4049 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4050}
4051
4052impl RenditionFilter {
4053 /// Creates a new default instance.
4054 pub fn new() -> Self {
4055 std::default::Default::default()
4056 }
4057
4058 /// Sets the value of [bitrate_bps][crate::model::RenditionFilter::bitrate_bps].
4059 ///
4060 /// # Example
4061 /// ```ignore,no_run
4062 /// # use google_cloud_video_stitcher_v1::model::RenditionFilter;
4063 /// let x = RenditionFilter::new().set_bitrate_bps(42);
4064 /// ```
4065 pub fn set_bitrate_bps<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4066 self.bitrate_bps = v.into();
4067 self
4068 }
4069
4070 /// Sets the value of [codecs][crate::model::RenditionFilter::codecs].
4071 ///
4072 /// # Example
4073 /// ```ignore,no_run
4074 /// # use google_cloud_video_stitcher_v1::model::RenditionFilter;
4075 /// let x = RenditionFilter::new().set_codecs("example");
4076 /// ```
4077 pub fn set_codecs<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4078 self.codecs = v.into();
4079 self
4080 }
4081}
4082
4083impl wkt::message::Message for RenditionFilter {
4084 fn typename() -> &'static str {
4085 "type.googleapis.com/google.cloud.video.stitcher.v1.RenditionFilter"
4086 }
4087}
4088
4089/// Slate object
4090#[derive(Clone, Default, PartialEq)]
4091#[non_exhaustive]
4092pub struct Slate {
4093 /// Output only. The name of the slate, in the form of
4094 /// `projects/{project_number}/locations/{location}/slates/{id}`.
4095 pub name: std::string::String,
4096
4097 /// The URI to fetch the source content for the slate. This URI must return an
4098 /// MP4 video with at least one audio track.
4099 pub uri: std::string::String,
4100
4101 /// gam_slate has all the GAM-related attributes of slates.
4102 pub gam_slate: std::option::Option<crate::model::slate::GamSlate>,
4103
4104 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4105}
4106
4107impl Slate {
4108 /// Creates a new default instance.
4109 pub fn new() -> Self {
4110 std::default::Default::default()
4111 }
4112
4113 /// Sets the value of [name][crate::model::Slate::name].
4114 ///
4115 /// # Example
4116 /// ```ignore,no_run
4117 /// # use google_cloud_video_stitcher_v1::model::Slate;
4118 /// # let project_id = "project_id";
4119 /// # let location_id = "location_id";
4120 /// # let slate_id = "slate_id";
4121 /// let x = Slate::new().set_name(format!("projects/{project_id}/locations/{location_id}/slates/{slate_id}"));
4122 /// ```
4123 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4124 self.name = v.into();
4125 self
4126 }
4127
4128 /// Sets the value of [uri][crate::model::Slate::uri].
4129 ///
4130 /// # Example
4131 /// ```ignore,no_run
4132 /// # use google_cloud_video_stitcher_v1::model::Slate;
4133 /// let x = Slate::new().set_uri("example");
4134 /// ```
4135 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4136 self.uri = v.into();
4137 self
4138 }
4139
4140 /// Sets the value of [gam_slate][crate::model::Slate::gam_slate].
4141 ///
4142 /// # Example
4143 /// ```ignore,no_run
4144 /// # use google_cloud_video_stitcher_v1::model::Slate;
4145 /// use google_cloud_video_stitcher_v1::model::slate::GamSlate;
4146 /// let x = Slate::new().set_gam_slate(GamSlate::default()/* use setters */);
4147 /// ```
4148 pub fn set_gam_slate<T>(mut self, v: T) -> Self
4149 where
4150 T: std::convert::Into<crate::model::slate::GamSlate>,
4151 {
4152 self.gam_slate = std::option::Option::Some(v.into());
4153 self
4154 }
4155
4156 /// Sets or clears the value of [gam_slate][crate::model::Slate::gam_slate].
4157 ///
4158 /// # Example
4159 /// ```ignore,no_run
4160 /// # use google_cloud_video_stitcher_v1::model::Slate;
4161 /// use google_cloud_video_stitcher_v1::model::slate::GamSlate;
4162 /// let x = Slate::new().set_or_clear_gam_slate(Some(GamSlate::default()/* use setters */));
4163 /// let x = Slate::new().set_or_clear_gam_slate(None::<GamSlate>);
4164 /// ```
4165 pub fn set_or_clear_gam_slate<T>(mut self, v: std::option::Option<T>) -> Self
4166 where
4167 T: std::convert::Into<crate::model::slate::GamSlate>,
4168 {
4169 self.gam_slate = v.map(|x| x.into());
4170 self
4171 }
4172}
4173
4174impl wkt::message::Message for Slate {
4175 fn typename() -> &'static str {
4176 "type.googleapis.com/google.cloud.video.stitcher.v1.Slate"
4177 }
4178}
4179
4180/// Defines additional types related to [Slate].
4181pub mod slate {
4182 #[allow(unused_imports)]
4183 use super::*;
4184
4185 /// GamSlate object has Google Ad Manager (GAM) related properties for the
4186 /// slate.
4187 #[derive(Clone, Default, PartialEq)]
4188 #[non_exhaustive]
4189 pub struct GamSlate {
4190 /// Required. Ad Manager network code to associate with the live config.
4191 pub network_code: std::string::String,
4192
4193 /// Output only. The identifier generated for the slate by GAM.
4194 pub gam_slate_id: i64,
4195
4196 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4197 }
4198
4199 impl GamSlate {
4200 /// Creates a new default instance.
4201 pub fn new() -> Self {
4202 std::default::Default::default()
4203 }
4204
4205 /// Sets the value of [network_code][crate::model::slate::GamSlate::network_code].
4206 ///
4207 /// # Example
4208 /// ```ignore,no_run
4209 /// # use google_cloud_video_stitcher_v1::model::slate::GamSlate;
4210 /// let x = GamSlate::new().set_network_code("example");
4211 /// ```
4212 pub fn set_network_code<T: std::convert::Into<std::string::String>>(
4213 mut self,
4214 v: T,
4215 ) -> Self {
4216 self.network_code = v.into();
4217 self
4218 }
4219
4220 /// Sets the value of [gam_slate_id][crate::model::slate::GamSlate::gam_slate_id].
4221 ///
4222 /// # Example
4223 /// ```ignore,no_run
4224 /// # use google_cloud_video_stitcher_v1::model::slate::GamSlate;
4225 /// let x = GamSlate::new().set_gam_slate_id(42);
4226 /// ```
4227 pub fn set_gam_slate_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4228 self.gam_slate_id = v.into();
4229 self
4230 }
4231 }
4232
4233 impl wkt::message::Message for GamSlate {
4234 fn typename() -> &'static str {
4235 "type.googleapis.com/google.cloud.video.stitcher.v1.Slate.GamSlate"
4236 }
4237 }
4238}
4239
4240/// Information related to the interstitial of a VOD session. This resource is
4241/// only available for VOD sessions that do not implement Google Ad Manager ad
4242/// insertion.
4243#[derive(Clone, Default, PartialEq)]
4244#[non_exhaustive]
4245pub struct VodStitchDetail {
4246 /// The name of the stitch detail in the specified VOD session, in the form of
4247 /// `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`.
4248 pub name: std::string::String,
4249
4250 /// A list of ad processing details for the fetched ad playlist.
4251 pub ad_stitch_details: std::vec::Vec<crate::model::AdStitchDetail>,
4252
4253 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4254}
4255
4256impl VodStitchDetail {
4257 /// Creates a new default instance.
4258 pub fn new() -> Self {
4259 std::default::Default::default()
4260 }
4261
4262 /// Sets the value of [name][crate::model::VodStitchDetail::name].
4263 ///
4264 /// # Example
4265 /// ```ignore,no_run
4266 /// # use google_cloud_video_stitcher_v1::model::VodStitchDetail;
4267 /// # let project_id = "project_id";
4268 /// # let location_id = "location_id";
4269 /// # let vod_session_id = "vod_session_id";
4270 /// # let vod_stitch_detail_id = "vod_stitch_detail_id";
4271 /// let x = VodStitchDetail::new().set_name(format!("projects/{project_id}/locations/{location_id}/vodSessions/{vod_session_id}/vodStitchDetails/{vod_stitch_detail_id}"));
4272 /// ```
4273 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4274 self.name = v.into();
4275 self
4276 }
4277
4278 /// Sets the value of [ad_stitch_details][crate::model::VodStitchDetail::ad_stitch_details].
4279 ///
4280 /// # Example
4281 /// ```ignore,no_run
4282 /// # use google_cloud_video_stitcher_v1::model::VodStitchDetail;
4283 /// use google_cloud_video_stitcher_v1::model::AdStitchDetail;
4284 /// let x = VodStitchDetail::new()
4285 /// .set_ad_stitch_details([
4286 /// AdStitchDetail::default()/* use setters */,
4287 /// AdStitchDetail::default()/* use (different) setters */,
4288 /// ]);
4289 /// ```
4290 pub fn set_ad_stitch_details<T, V>(mut self, v: T) -> Self
4291 where
4292 T: std::iter::IntoIterator<Item = V>,
4293 V: std::convert::Into<crate::model::AdStitchDetail>,
4294 {
4295 use std::iter::Iterator;
4296 self.ad_stitch_details = v.into_iter().map(|i| i.into()).collect();
4297 self
4298 }
4299}
4300
4301impl wkt::message::Message for VodStitchDetail {
4302 fn typename() -> &'static str {
4303 "type.googleapis.com/google.cloud.video.stitcher.v1.VodStitchDetail"
4304 }
4305}
4306
4307/// Metadata for a stitched ad.
4308#[derive(Clone, Default, PartialEq)]
4309#[non_exhaustive]
4310pub struct AdStitchDetail {
4311 /// Required. The ad break ID of the processed ad.
4312 pub ad_break_id: std::string::String,
4313
4314 /// Required. The ad ID of the processed ad.
4315 pub ad_id: std::string::String,
4316
4317 /// Required. The time offset of the processed ad.
4318 pub ad_time_offset: std::option::Option<wkt::Duration>,
4319
4320 /// Optional. Indicates the reason why the ad has been skipped.
4321 pub skip_reason: std::string::String,
4322
4323 /// Optional. The metadata of the chosen media file for the ad.
4324 pub media: std::collections::HashMap<std::string::String, wkt::Value>,
4325
4326 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4327}
4328
4329impl AdStitchDetail {
4330 /// Creates a new default instance.
4331 pub fn new() -> Self {
4332 std::default::Default::default()
4333 }
4334
4335 /// Sets the value of [ad_break_id][crate::model::AdStitchDetail::ad_break_id].
4336 ///
4337 /// # Example
4338 /// ```ignore,no_run
4339 /// # use google_cloud_video_stitcher_v1::model::AdStitchDetail;
4340 /// let x = AdStitchDetail::new().set_ad_break_id("example");
4341 /// ```
4342 pub fn set_ad_break_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4343 self.ad_break_id = v.into();
4344 self
4345 }
4346
4347 /// Sets the value of [ad_id][crate::model::AdStitchDetail::ad_id].
4348 ///
4349 /// # Example
4350 /// ```ignore,no_run
4351 /// # use google_cloud_video_stitcher_v1::model::AdStitchDetail;
4352 /// let x = AdStitchDetail::new().set_ad_id("example");
4353 /// ```
4354 pub fn set_ad_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4355 self.ad_id = v.into();
4356 self
4357 }
4358
4359 /// Sets the value of [ad_time_offset][crate::model::AdStitchDetail::ad_time_offset].
4360 ///
4361 /// # Example
4362 /// ```ignore,no_run
4363 /// # use google_cloud_video_stitcher_v1::model::AdStitchDetail;
4364 /// use wkt::Duration;
4365 /// let x = AdStitchDetail::new().set_ad_time_offset(Duration::default()/* use setters */);
4366 /// ```
4367 pub fn set_ad_time_offset<T>(mut self, v: T) -> Self
4368 where
4369 T: std::convert::Into<wkt::Duration>,
4370 {
4371 self.ad_time_offset = std::option::Option::Some(v.into());
4372 self
4373 }
4374
4375 /// Sets or clears the value of [ad_time_offset][crate::model::AdStitchDetail::ad_time_offset].
4376 ///
4377 /// # Example
4378 /// ```ignore,no_run
4379 /// # use google_cloud_video_stitcher_v1::model::AdStitchDetail;
4380 /// use wkt::Duration;
4381 /// let x = AdStitchDetail::new().set_or_clear_ad_time_offset(Some(Duration::default()/* use setters */));
4382 /// let x = AdStitchDetail::new().set_or_clear_ad_time_offset(None::<Duration>);
4383 /// ```
4384 pub fn set_or_clear_ad_time_offset<T>(mut self, v: std::option::Option<T>) -> Self
4385 where
4386 T: std::convert::Into<wkt::Duration>,
4387 {
4388 self.ad_time_offset = v.map(|x| x.into());
4389 self
4390 }
4391
4392 /// Sets the value of [skip_reason][crate::model::AdStitchDetail::skip_reason].
4393 ///
4394 /// # Example
4395 /// ```ignore,no_run
4396 /// # use google_cloud_video_stitcher_v1::model::AdStitchDetail;
4397 /// let x = AdStitchDetail::new().set_skip_reason("example");
4398 /// ```
4399 pub fn set_skip_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4400 self.skip_reason = v.into();
4401 self
4402 }
4403
4404 /// Sets the value of [media][crate::model::AdStitchDetail::media].
4405 ///
4406 /// # Example
4407 /// ```ignore,no_run
4408 /// # use google_cloud_video_stitcher_v1::model::AdStitchDetail;
4409 /// use wkt::Value;
4410 /// let x = AdStitchDetail::new().set_media([
4411 /// ("key0", Value::default()/* use setters */),
4412 /// ("key1", Value::default()/* use (different) setters */),
4413 /// ]);
4414 /// ```
4415 pub fn set_media<T, K, V>(mut self, v: T) -> Self
4416 where
4417 T: std::iter::IntoIterator<Item = (K, V)>,
4418 K: std::convert::Into<std::string::String>,
4419 V: std::convert::Into<wkt::Value>,
4420 {
4421 use std::iter::Iterator;
4422 self.media = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4423 self
4424 }
4425}
4426
4427impl wkt::message::Message for AdStitchDetail {
4428 fn typename() -> &'static str {
4429 "type.googleapis.com/google.cloud.video.stitcher.v1.AdStitchDetail"
4430 }
4431}
4432
4433/// Request message for VideoStitcherService.createCdnKey.
4434#[derive(Clone, Default, PartialEq)]
4435#[non_exhaustive]
4436pub struct CreateCdnKeyRequest {
4437 /// Required. The project in which the CDN key should be created, in the form
4438 /// of `projects/{project_number}/locations/{location}`.
4439 pub parent: std::string::String,
4440
4441 /// Required. The CDN key resource to create.
4442 pub cdn_key: std::option::Option<crate::model::CdnKey>,
4443
4444 /// Required. The ID to use for the CDN key, which will become the final
4445 /// component of the CDN key's resource name.
4446 ///
4447 /// This value should conform to RFC-1034, which restricts to
4448 /// lower-case letters, numbers, and hyphen, with the first character a
4449 /// letter, the last a letter or a number, and a 63 character maximum.
4450 pub cdn_key_id: std::string::String,
4451
4452 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4453}
4454
4455impl CreateCdnKeyRequest {
4456 /// Creates a new default instance.
4457 pub fn new() -> Self {
4458 std::default::Default::default()
4459 }
4460
4461 /// Sets the value of [parent][crate::model::CreateCdnKeyRequest::parent].
4462 ///
4463 /// # Example
4464 /// ```ignore,no_run
4465 /// # use google_cloud_video_stitcher_v1::model::CreateCdnKeyRequest;
4466 /// # let project_id = "project_id";
4467 /// # let location_id = "location_id";
4468 /// let x = CreateCdnKeyRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
4469 /// ```
4470 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4471 self.parent = v.into();
4472 self
4473 }
4474
4475 /// Sets the value of [cdn_key][crate::model::CreateCdnKeyRequest::cdn_key].
4476 ///
4477 /// # Example
4478 /// ```ignore,no_run
4479 /// # use google_cloud_video_stitcher_v1::model::CreateCdnKeyRequest;
4480 /// use google_cloud_video_stitcher_v1::model::CdnKey;
4481 /// let x = CreateCdnKeyRequest::new().set_cdn_key(CdnKey::default()/* use setters */);
4482 /// ```
4483 pub fn set_cdn_key<T>(mut self, v: T) -> Self
4484 where
4485 T: std::convert::Into<crate::model::CdnKey>,
4486 {
4487 self.cdn_key = std::option::Option::Some(v.into());
4488 self
4489 }
4490
4491 /// Sets or clears the value of [cdn_key][crate::model::CreateCdnKeyRequest::cdn_key].
4492 ///
4493 /// # Example
4494 /// ```ignore,no_run
4495 /// # use google_cloud_video_stitcher_v1::model::CreateCdnKeyRequest;
4496 /// use google_cloud_video_stitcher_v1::model::CdnKey;
4497 /// let x = CreateCdnKeyRequest::new().set_or_clear_cdn_key(Some(CdnKey::default()/* use setters */));
4498 /// let x = CreateCdnKeyRequest::new().set_or_clear_cdn_key(None::<CdnKey>);
4499 /// ```
4500 pub fn set_or_clear_cdn_key<T>(mut self, v: std::option::Option<T>) -> Self
4501 where
4502 T: std::convert::Into<crate::model::CdnKey>,
4503 {
4504 self.cdn_key = v.map(|x| x.into());
4505 self
4506 }
4507
4508 /// Sets the value of [cdn_key_id][crate::model::CreateCdnKeyRequest::cdn_key_id].
4509 ///
4510 /// # Example
4511 /// ```ignore,no_run
4512 /// # use google_cloud_video_stitcher_v1::model::CreateCdnKeyRequest;
4513 /// let x = CreateCdnKeyRequest::new().set_cdn_key_id("example");
4514 /// ```
4515 pub fn set_cdn_key_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4516 self.cdn_key_id = v.into();
4517 self
4518 }
4519}
4520
4521impl wkt::message::Message for CreateCdnKeyRequest {
4522 fn typename() -> &'static str {
4523 "type.googleapis.com/google.cloud.video.stitcher.v1.CreateCdnKeyRequest"
4524 }
4525}
4526
4527/// Request message for VideoStitcherService.listCdnKeys.
4528#[derive(Clone, Default, PartialEq)]
4529#[non_exhaustive]
4530pub struct ListCdnKeysRequest {
4531 /// Required. The project that contains the list of CDN keys, in the form of
4532 /// `projects/{project_number}/locations/{location}`.
4533 pub parent: std::string::String,
4534
4535 /// Requested page size. Server may return fewer items than requested.
4536 /// If unspecified, server will pick an appropriate default.
4537 pub page_size: i32,
4538
4539 /// A token identifying a page of results the server should return.
4540 pub page_token: std::string::String,
4541
4542 /// Filtering results
4543 pub filter: std::string::String,
4544
4545 /// Hint for how to order the results
4546 pub order_by: std::string::String,
4547
4548 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4549}
4550
4551impl ListCdnKeysRequest {
4552 /// Creates a new default instance.
4553 pub fn new() -> Self {
4554 std::default::Default::default()
4555 }
4556
4557 /// Sets the value of [parent][crate::model::ListCdnKeysRequest::parent].
4558 ///
4559 /// # Example
4560 /// ```ignore,no_run
4561 /// # use google_cloud_video_stitcher_v1::model::ListCdnKeysRequest;
4562 /// # let project_id = "project_id";
4563 /// # let location_id = "location_id";
4564 /// let x = ListCdnKeysRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
4565 /// ```
4566 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4567 self.parent = v.into();
4568 self
4569 }
4570
4571 /// Sets the value of [page_size][crate::model::ListCdnKeysRequest::page_size].
4572 ///
4573 /// # Example
4574 /// ```ignore,no_run
4575 /// # use google_cloud_video_stitcher_v1::model::ListCdnKeysRequest;
4576 /// let x = ListCdnKeysRequest::new().set_page_size(42);
4577 /// ```
4578 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4579 self.page_size = v.into();
4580 self
4581 }
4582
4583 /// Sets the value of [page_token][crate::model::ListCdnKeysRequest::page_token].
4584 ///
4585 /// # Example
4586 /// ```ignore,no_run
4587 /// # use google_cloud_video_stitcher_v1::model::ListCdnKeysRequest;
4588 /// let x = ListCdnKeysRequest::new().set_page_token("example");
4589 /// ```
4590 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4591 self.page_token = v.into();
4592 self
4593 }
4594
4595 /// Sets the value of [filter][crate::model::ListCdnKeysRequest::filter].
4596 ///
4597 /// # Example
4598 /// ```ignore,no_run
4599 /// # use google_cloud_video_stitcher_v1::model::ListCdnKeysRequest;
4600 /// let x = ListCdnKeysRequest::new().set_filter("example");
4601 /// ```
4602 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4603 self.filter = v.into();
4604 self
4605 }
4606
4607 /// Sets the value of [order_by][crate::model::ListCdnKeysRequest::order_by].
4608 ///
4609 /// # Example
4610 /// ```ignore,no_run
4611 /// # use google_cloud_video_stitcher_v1::model::ListCdnKeysRequest;
4612 /// let x = ListCdnKeysRequest::new().set_order_by("example");
4613 /// ```
4614 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4615 self.order_by = v.into();
4616 self
4617 }
4618}
4619
4620impl wkt::message::Message for ListCdnKeysRequest {
4621 fn typename() -> &'static str {
4622 "type.googleapis.com/google.cloud.video.stitcher.v1.ListCdnKeysRequest"
4623 }
4624}
4625
4626/// Response message for VideoStitcher.ListCdnKeys.
4627#[derive(Clone, Default, PartialEq)]
4628#[non_exhaustive]
4629pub struct ListCdnKeysResponse {
4630 /// List of CDN keys.
4631 pub cdn_keys: std::vec::Vec<crate::model::CdnKey>,
4632
4633 /// A token identifying a page of results the server should return.
4634 pub next_page_token: std::string::String,
4635
4636 /// Locations that could not be reached.
4637 pub unreachable: std::vec::Vec<std::string::String>,
4638
4639 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4640}
4641
4642impl ListCdnKeysResponse {
4643 /// Creates a new default instance.
4644 pub fn new() -> Self {
4645 std::default::Default::default()
4646 }
4647
4648 /// Sets the value of [cdn_keys][crate::model::ListCdnKeysResponse::cdn_keys].
4649 ///
4650 /// # Example
4651 /// ```ignore,no_run
4652 /// # use google_cloud_video_stitcher_v1::model::ListCdnKeysResponse;
4653 /// use google_cloud_video_stitcher_v1::model::CdnKey;
4654 /// let x = ListCdnKeysResponse::new()
4655 /// .set_cdn_keys([
4656 /// CdnKey::default()/* use setters */,
4657 /// CdnKey::default()/* use (different) setters */,
4658 /// ]);
4659 /// ```
4660 pub fn set_cdn_keys<T, V>(mut self, v: T) -> Self
4661 where
4662 T: std::iter::IntoIterator<Item = V>,
4663 V: std::convert::Into<crate::model::CdnKey>,
4664 {
4665 use std::iter::Iterator;
4666 self.cdn_keys = v.into_iter().map(|i| i.into()).collect();
4667 self
4668 }
4669
4670 /// Sets the value of [next_page_token][crate::model::ListCdnKeysResponse::next_page_token].
4671 ///
4672 /// # Example
4673 /// ```ignore,no_run
4674 /// # use google_cloud_video_stitcher_v1::model::ListCdnKeysResponse;
4675 /// let x = ListCdnKeysResponse::new().set_next_page_token("example");
4676 /// ```
4677 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4678 self.next_page_token = v.into();
4679 self
4680 }
4681
4682 /// Sets the value of [unreachable][crate::model::ListCdnKeysResponse::unreachable].
4683 ///
4684 /// # Example
4685 /// ```ignore,no_run
4686 /// # use google_cloud_video_stitcher_v1::model::ListCdnKeysResponse;
4687 /// let x = ListCdnKeysResponse::new().set_unreachable(["a", "b", "c"]);
4688 /// ```
4689 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4690 where
4691 T: std::iter::IntoIterator<Item = V>,
4692 V: std::convert::Into<std::string::String>,
4693 {
4694 use std::iter::Iterator;
4695 self.unreachable = v.into_iter().map(|i| i.into()).collect();
4696 self
4697 }
4698}
4699
4700impl wkt::message::Message for ListCdnKeysResponse {
4701 fn typename() -> &'static str {
4702 "type.googleapis.com/google.cloud.video.stitcher.v1.ListCdnKeysResponse"
4703 }
4704}
4705
4706#[doc(hidden)]
4707impl google_cloud_gax::paginator::internal::PageableResponse for ListCdnKeysResponse {
4708 type PageItem = crate::model::CdnKey;
4709
4710 fn items(self) -> std::vec::Vec<Self::PageItem> {
4711 self.cdn_keys
4712 }
4713
4714 fn next_page_token(&self) -> std::string::String {
4715 use std::clone::Clone;
4716 self.next_page_token.clone()
4717 }
4718}
4719
4720/// Request message for VideoStitcherService.getCdnKey.
4721#[derive(Clone, Default, PartialEq)]
4722#[non_exhaustive]
4723pub struct GetCdnKeyRequest {
4724 /// Required. The name of the CDN key to be retrieved, in the form of
4725 /// `projects/{project}/locations/{location}/cdnKeys/{id}`.
4726 pub name: std::string::String,
4727
4728 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4729}
4730
4731impl GetCdnKeyRequest {
4732 /// Creates a new default instance.
4733 pub fn new() -> Self {
4734 std::default::Default::default()
4735 }
4736
4737 /// Sets the value of [name][crate::model::GetCdnKeyRequest::name].
4738 ///
4739 /// # Example
4740 /// ```ignore,no_run
4741 /// # use google_cloud_video_stitcher_v1::model::GetCdnKeyRequest;
4742 /// # let project_id = "project_id";
4743 /// # let location_id = "location_id";
4744 /// # let cdn_key_id = "cdn_key_id";
4745 /// let x = GetCdnKeyRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/cdnKeys/{cdn_key_id}"));
4746 /// ```
4747 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4748 self.name = v.into();
4749 self
4750 }
4751}
4752
4753impl wkt::message::Message for GetCdnKeyRequest {
4754 fn typename() -> &'static str {
4755 "type.googleapis.com/google.cloud.video.stitcher.v1.GetCdnKeyRequest"
4756 }
4757}
4758
4759/// Request message for VideoStitcherService.deleteCdnKey.
4760#[derive(Clone, Default, PartialEq)]
4761#[non_exhaustive]
4762pub struct DeleteCdnKeyRequest {
4763 /// Required. The name of the CDN key to be deleted, in the form of
4764 /// `projects/{project_number}/locations/{location}/cdnKeys/{id}`.
4765 pub name: std::string::String,
4766
4767 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4768}
4769
4770impl DeleteCdnKeyRequest {
4771 /// Creates a new default instance.
4772 pub fn new() -> Self {
4773 std::default::Default::default()
4774 }
4775
4776 /// Sets the value of [name][crate::model::DeleteCdnKeyRequest::name].
4777 ///
4778 /// # Example
4779 /// ```ignore,no_run
4780 /// # use google_cloud_video_stitcher_v1::model::DeleteCdnKeyRequest;
4781 /// # let project_id = "project_id";
4782 /// # let location_id = "location_id";
4783 /// # let cdn_key_id = "cdn_key_id";
4784 /// let x = DeleteCdnKeyRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/cdnKeys/{cdn_key_id}"));
4785 /// ```
4786 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4787 self.name = v.into();
4788 self
4789 }
4790}
4791
4792impl wkt::message::Message for DeleteCdnKeyRequest {
4793 fn typename() -> &'static str {
4794 "type.googleapis.com/google.cloud.video.stitcher.v1.DeleteCdnKeyRequest"
4795 }
4796}
4797
4798/// Request message for VideoStitcherService.updateCdnKey.
4799#[derive(Clone, Default, PartialEq)]
4800#[non_exhaustive]
4801pub struct UpdateCdnKeyRequest {
4802 /// Required. The CDN key resource which replaces the resource on the server.
4803 pub cdn_key: std::option::Option<crate::model::CdnKey>,
4804
4805 /// Required. The update mask applies to the resource.
4806 /// For the `FieldMask` definition, see
4807 /// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask>
4808 pub update_mask: std::option::Option<wkt::FieldMask>,
4809
4810 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4811}
4812
4813impl UpdateCdnKeyRequest {
4814 /// Creates a new default instance.
4815 pub fn new() -> Self {
4816 std::default::Default::default()
4817 }
4818
4819 /// Sets the value of [cdn_key][crate::model::UpdateCdnKeyRequest::cdn_key].
4820 ///
4821 /// # Example
4822 /// ```ignore,no_run
4823 /// # use google_cloud_video_stitcher_v1::model::UpdateCdnKeyRequest;
4824 /// use google_cloud_video_stitcher_v1::model::CdnKey;
4825 /// let x = UpdateCdnKeyRequest::new().set_cdn_key(CdnKey::default()/* use setters */);
4826 /// ```
4827 pub fn set_cdn_key<T>(mut self, v: T) -> Self
4828 where
4829 T: std::convert::Into<crate::model::CdnKey>,
4830 {
4831 self.cdn_key = std::option::Option::Some(v.into());
4832 self
4833 }
4834
4835 /// Sets or clears the value of [cdn_key][crate::model::UpdateCdnKeyRequest::cdn_key].
4836 ///
4837 /// # Example
4838 /// ```ignore,no_run
4839 /// # use google_cloud_video_stitcher_v1::model::UpdateCdnKeyRequest;
4840 /// use google_cloud_video_stitcher_v1::model::CdnKey;
4841 /// let x = UpdateCdnKeyRequest::new().set_or_clear_cdn_key(Some(CdnKey::default()/* use setters */));
4842 /// let x = UpdateCdnKeyRequest::new().set_or_clear_cdn_key(None::<CdnKey>);
4843 /// ```
4844 pub fn set_or_clear_cdn_key<T>(mut self, v: std::option::Option<T>) -> Self
4845 where
4846 T: std::convert::Into<crate::model::CdnKey>,
4847 {
4848 self.cdn_key = v.map(|x| x.into());
4849 self
4850 }
4851
4852 /// Sets the value of [update_mask][crate::model::UpdateCdnKeyRequest::update_mask].
4853 ///
4854 /// # Example
4855 /// ```ignore,no_run
4856 /// # use google_cloud_video_stitcher_v1::model::UpdateCdnKeyRequest;
4857 /// use wkt::FieldMask;
4858 /// let x = UpdateCdnKeyRequest::new().set_update_mask(FieldMask::default()/* use setters */);
4859 /// ```
4860 pub fn set_update_mask<T>(mut self, v: T) -> Self
4861 where
4862 T: std::convert::Into<wkt::FieldMask>,
4863 {
4864 self.update_mask = std::option::Option::Some(v.into());
4865 self
4866 }
4867
4868 /// Sets or clears the value of [update_mask][crate::model::UpdateCdnKeyRequest::update_mask].
4869 ///
4870 /// # Example
4871 /// ```ignore,no_run
4872 /// # use google_cloud_video_stitcher_v1::model::UpdateCdnKeyRequest;
4873 /// use wkt::FieldMask;
4874 /// let x = UpdateCdnKeyRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
4875 /// let x = UpdateCdnKeyRequest::new().set_or_clear_update_mask(None::<FieldMask>);
4876 /// ```
4877 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4878 where
4879 T: std::convert::Into<wkt::FieldMask>,
4880 {
4881 self.update_mask = v.map(|x| x.into());
4882 self
4883 }
4884}
4885
4886impl wkt::message::Message for UpdateCdnKeyRequest {
4887 fn typename() -> &'static str {
4888 "type.googleapis.com/google.cloud.video.stitcher.v1.UpdateCdnKeyRequest"
4889 }
4890}
4891
4892/// Request message for VideoStitcherService.createVodSession
4893#[derive(Clone, Default, PartialEq)]
4894#[non_exhaustive]
4895pub struct CreateVodSessionRequest {
4896 /// Required. The project and location in which the VOD session should be
4897 /// created, in the form of `projects/{project_number}/locations/{location}`.
4898 pub parent: std::string::String,
4899
4900 /// Required. Parameters for creating a session.
4901 pub vod_session: std::option::Option<crate::model::VodSession>,
4902
4903 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4904}
4905
4906impl CreateVodSessionRequest {
4907 /// Creates a new default instance.
4908 pub fn new() -> Self {
4909 std::default::Default::default()
4910 }
4911
4912 /// Sets the value of [parent][crate::model::CreateVodSessionRequest::parent].
4913 ///
4914 /// # Example
4915 /// ```ignore,no_run
4916 /// # use google_cloud_video_stitcher_v1::model::CreateVodSessionRequest;
4917 /// # let project_id = "project_id";
4918 /// # let location_id = "location_id";
4919 /// let x = CreateVodSessionRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
4920 /// ```
4921 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4922 self.parent = v.into();
4923 self
4924 }
4925
4926 /// Sets the value of [vod_session][crate::model::CreateVodSessionRequest::vod_session].
4927 ///
4928 /// # Example
4929 /// ```ignore,no_run
4930 /// # use google_cloud_video_stitcher_v1::model::CreateVodSessionRequest;
4931 /// use google_cloud_video_stitcher_v1::model::VodSession;
4932 /// let x = CreateVodSessionRequest::new().set_vod_session(VodSession::default()/* use setters */);
4933 /// ```
4934 pub fn set_vod_session<T>(mut self, v: T) -> Self
4935 where
4936 T: std::convert::Into<crate::model::VodSession>,
4937 {
4938 self.vod_session = std::option::Option::Some(v.into());
4939 self
4940 }
4941
4942 /// Sets or clears the value of [vod_session][crate::model::CreateVodSessionRequest::vod_session].
4943 ///
4944 /// # Example
4945 /// ```ignore,no_run
4946 /// # use google_cloud_video_stitcher_v1::model::CreateVodSessionRequest;
4947 /// use google_cloud_video_stitcher_v1::model::VodSession;
4948 /// let x = CreateVodSessionRequest::new().set_or_clear_vod_session(Some(VodSession::default()/* use setters */));
4949 /// let x = CreateVodSessionRequest::new().set_or_clear_vod_session(None::<VodSession>);
4950 /// ```
4951 pub fn set_or_clear_vod_session<T>(mut self, v: std::option::Option<T>) -> Self
4952 where
4953 T: std::convert::Into<crate::model::VodSession>,
4954 {
4955 self.vod_session = v.map(|x| x.into());
4956 self
4957 }
4958}
4959
4960impl wkt::message::Message for CreateVodSessionRequest {
4961 fn typename() -> &'static str {
4962 "type.googleapis.com/google.cloud.video.stitcher.v1.CreateVodSessionRequest"
4963 }
4964}
4965
4966/// Request message for VideoStitcherService.getVodSession
4967#[derive(Clone, Default, PartialEq)]
4968#[non_exhaustive]
4969pub struct GetVodSessionRequest {
4970 /// Required. The name of the VOD session to be retrieved, in the form of
4971 /// `projects/{project_number}/locations/{location}/vodSessions/{id}`.
4972 pub name: std::string::String,
4973
4974 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4975}
4976
4977impl GetVodSessionRequest {
4978 /// Creates a new default instance.
4979 pub fn new() -> Self {
4980 std::default::Default::default()
4981 }
4982
4983 /// Sets the value of [name][crate::model::GetVodSessionRequest::name].
4984 ///
4985 /// # Example
4986 /// ```ignore,no_run
4987 /// # use google_cloud_video_stitcher_v1::model::GetVodSessionRequest;
4988 /// # let project_id = "project_id";
4989 /// # let location_id = "location_id";
4990 /// # let vod_session_id = "vod_session_id";
4991 /// let x = GetVodSessionRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/vodSessions/{vod_session_id}"));
4992 /// ```
4993 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4994 self.name = v.into();
4995 self
4996 }
4997}
4998
4999impl wkt::message::Message for GetVodSessionRequest {
5000 fn typename() -> &'static str {
5001 "type.googleapis.com/google.cloud.video.stitcher.v1.GetVodSessionRequest"
5002 }
5003}
5004
5005/// Request message for VideoStitcherService.listVodStitchDetails.
5006#[derive(Clone, Default, PartialEq)]
5007#[non_exhaustive]
5008pub struct ListVodStitchDetailsRequest {
5009 /// Required. The VOD session where the stitch details belong to, in the form
5010 /// of `projects/{project}/locations/{location}/vodSessions/{id}`.
5011 pub parent: std::string::String,
5012
5013 /// The maximum number of items to return.
5014 pub page_size: i32,
5015
5016 /// The next_page_token value returned from a previous List request, if any.
5017 pub page_token: std::string::String,
5018
5019 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5020}
5021
5022impl ListVodStitchDetailsRequest {
5023 /// Creates a new default instance.
5024 pub fn new() -> Self {
5025 std::default::Default::default()
5026 }
5027
5028 /// Sets the value of [parent][crate::model::ListVodStitchDetailsRequest::parent].
5029 ///
5030 /// # Example
5031 /// ```ignore,no_run
5032 /// # use google_cloud_video_stitcher_v1::model::ListVodStitchDetailsRequest;
5033 /// # let project_id = "project_id";
5034 /// # let location_id = "location_id";
5035 /// # let vod_session_id = "vod_session_id";
5036 /// let x = ListVodStitchDetailsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/vodSessions/{vod_session_id}"));
5037 /// ```
5038 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5039 self.parent = v.into();
5040 self
5041 }
5042
5043 /// Sets the value of [page_size][crate::model::ListVodStitchDetailsRequest::page_size].
5044 ///
5045 /// # Example
5046 /// ```ignore,no_run
5047 /// # use google_cloud_video_stitcher_v1::model::ListVodStitchDetailsRequest;
5048 /// let x = ListVodStitchDetailsRequest::new().set_page_size(42);
5049 /// ```
5050 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5051 self.page_size = v.into();
5052 self
5053 }
5054
5055 /// Sets the value of [page_token][crate::model::ListVodStitchDetailsRequest::page_token].
5056 ///
5057 /// # Example
5058 /// ```ignore,no_run
5059 /// # use google_cloud_video_stitcher_v1::model::ListVodStitchDetailsRequest;
5060 /// let x = ListVodStitchDetailsRequest::new().set_page_token("example");
5061 /// ```
5062 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5063 self.page_token = v.into();
5064 self
5065 }
5066}
5067
5068impl wkt::message::Message for ListVodStitchDetailsRequest {
5069 fn typename() -> &'static str {
5070 "type.googleapis.com/google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest"
5071 }
5072}
5073
5074/// Response message for VideoStitcherService.listVodStitchDetails.
5075#[derive(Clone, Default, PartialEq)]
5076#[non_exhaustive]
5077pub struct ListVodStitchDetailsResponse {
5078 /// A List of stitch Details.
5079 pub vod_stitch_details: std::vec::Vec<crate::model::VodStitchDetail>,
5080
5081 /// The pagination token.
5082 pub next_page_token: std::string::String,
5083
5084 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5085}
5086
5087impl ListVodStitchDetailsResponse {
5088 /// Creates a new default instance.
5089 pub fn new() -> Self {
5090 std::default::Default::default()
5091 }
5092
5093 /// Sets the value of [vod_stitch_details][crate::model::ListVodStitchDetailsResponse::vod_stitch_details].
5094 ///
5095 /// # Example
5096 /// ```ignore,no_run
5097 /// # use google_cloud_video_stitcher_v1::model::ListVodStitchDetailsResponse;
5098 /// use google_cloud_video_stitcher_v1::model::VodStitchDetail;
5099 /// let x = ListVodStitchDetailsResponse::new()
5100 /// .set_vod_stitch_details([
5101 /// VodStitchDetail::default()/* use setters */,
5102 /// VodStitchDetail::default()/* use (different) setters */,
5103 /// ]);
5104 /// ```
5105 pub fn set_vod_stitch_details<T, V>(mut self, v: T) -> Self
5106 where
5107 T: std::iter::IntoIterator<Item = V>,
5108 V: std::convert::Into<crate::model::VodStitchDetail>,
5109 {
5110 use std::iter::Iterator;
5111 self.vod_stitch_details = v.into_iter().map(|i| i.into()).collect();
5112 self
5113 }
5114
5115 /// Sets the value of [next_page_token][crate::model::ListVodStitchDetailsResponse::next_page_token].
5116 ///
5117 /// # Example
5118 /// ```ignore,no_run
5119 /// # use google_cloud_video_stitcher_v1::model::ListVodStitchDetailsResponse;
5120 /// let x = ListVodStitchDetailsResponse::new().set_next_page_token("example");
5121 /// ```
5122 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5123 self.next_page_token = v.into();
5124 self
5125 }
5126}
5127
5128impl wkt::message::Message for ListVodStitchDetailsResponse {
5129 fn typename() -> &'static str {
5130 "type.googleapis.com/google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse"
5131 }
5132}
5133
5134#[doc(hidden)]
5135impl google_cloud_gax::paginator::internal::PageableResponse for ListVodStitchDetailsResponse {
5136 type PageItem = crate::model::VodStitchDetail;
5137
5138 fn items(self) -> std::vec::Vec<Self::PageItem> {
5139 self.vod_stitch_details
5140 }
5141
5142 fn next_page_token(&self) -> std::string::String {
5143 use std::clone::Clone;
5144 self.next_page_token.clone()
5145 }
5146}
5147
5148/// Request message for VideoStitcherService.getVodStitchDetail.
5149#[derive(Clone, Default, PartialEq)]
5150#[non_exhaustive]
5151pub struct GetVodStitchDetailRequest {
5152 /// Required. The name of the stitch detail in the specified VOD session, in
5153 /// the form of
5154 /// `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`.
5155 pub name: std::string::String,
5156
5157 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5158}
5159
5160impl GetVodStitchDetailRequest {
5161 /// Creates a new default instance.
5162 pub fn new() -> Self {
5163 std::default::Default::default()
5164 }
5165
5166 /// Sets the value of [name][crate::model::GetVodStitchDetailRequest::name].
5167 ///
5168 /// # Example
5169 /// ```ignore,no_run
5170 /// # use google_cloud_video_stitcher_v1::model::GetVodStitchDetailRequest;
5171 /// # let project_id = "project_id";
5172 /// # let location_id = "location_id";
5173 /// # let vod_session_id = "vod_session_id";
5174 /// # let vod_stitch_detail_id = "vod_stitch_detail_id";
5175 /// let x = GetVodStitchDetailRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/vodSessions/{vod_session_id}/vodStitchDetails/{vod_stitch_detail_id}"));
5176 /// ```
5177 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5178 self.name = v.into();
5179 self
5180 }
5181}
5182
5183impl wkt::message::Message for GetVodStitchDetailRequest {
5184 fn typename() -> &'static str {
5185 "type.googleapis.com/google.cloud.video.stitcher.v1.GetVodStitchDetailRequest"
5186 }
5187}
5188
5189/// Request message for VideoStitcherService.listVodAdTagDetails.
5190#[derive(Clone, Default, PartialEq)]
5191#[non_exhaustive]
5192pub struct ListVodAdTagDetailsRequest {
5193 /// Required. The VOD session which the ad tag details belong to, in the form
5194 /// of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`.
5195 pub parent: std::string::String,
5196
5197 /// The maximum number of items to return.
5198 pub page_size: i32,
5199
5200 /// The next_page_token value returned from a previous List request, if any.
5201 pub page_token: std::string::String,
5202
5203 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5204}
5205
5206impl ListVodAdTagDetailsRequest {
5207 /// Creates a new default instance.
5208 pub fn new() -> Self {
5209 std::default::Default::default()
5210 }
5211
5212 /// Sets the value of [parent][crate::model::ListVodAdTagDetailsRequest::parent].
5213 ///
5214 /// # Example
5215 /// ```ignore,no_run
5216 /// # use google_cloud_video_stitcher_v1::model::ListVodAdTagDetailsRequest;
5217 /// # let project_id = "project_id";
5218 /// # let location_id = "location_id";
5219 /// # let vod_session_id = "vod_session_id";
5220 /// let x = ListVodAdTagDetailsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/vodSessions/{vod_session_id}"));
5221 /// ```
5222 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5223 self.parent = v.into();
5224 self
5225 }
5226
5227 /// Sets the value of [page_size][crate::model::ListVodAdTagDetailsRequest::page_size].
5228 ///
5229 /// # Example
5230 /// ```ignore,no_run
5231 /// # use google_cloud_video_stitcher_v1::model::ListVodAdTagDetailsRequest;
5232 /// let x = ListVodAdTagDetailsRequest::new().set_page_size(42);
5233 /// ```
5234 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5235 self.page_size = v.into();
5236 self
5237 }
5238
5239 /// Sets the value of [page_token][crate::model::ListVodAdTagDetailsRequest::page_token].
5240 ///
5241 /// # Example
5242 /// ```ignore,no_run
5243 /// # use google_cloud_video_stitcher_v1::model::ListVodAdTagDetailsRequest;
5244 /// let x = ListVodAdTagDetailsRequest::new().set_page_token("example");
5245 /// ```
5246 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5247 self.page_token = v.into();
5248 self
5249 }
5250}
5251
5252impl wkt::message::Message for ListVodAdTagDetailsRequest {
5253 fn typename() -> &'static str {
5254 "type.googleapis.com/google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest"
5255 }
5256}
5257
5258/// Response message for VideoStitcherService.listVodAdTagDetails.
5259#[derive(Clone, Default, PartialEq)]
5260#[non_exhaustive]
5261pub struct ListVodAdTagDetailsResponse {
5262 /// A List of ad tag details.
5263 pub vod_ad_tag_details: std::vec::Vec<crate::model::VodAdTagDetail>,
5264
5265 /// The pagination token.
5266 pub next_page_token: std::string::String,
5267
5268 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5269}
5270
5271impl ListVodAdTagDetailsResponse {
5272 /// Creates a new default instance.
5273 pub fn new() -> Self {
5274 std::default::Default::default()
5275 }
5276
5277 /// Sets the value of [vod_ad_tag_details][crate::model::ListVodAdTagDetailsResponse::vod_ad_tag_details].
5278 ///
5279 /// # Example
5280 /// ```ignore,no_run
5281 /// # use google_cloud_video_stitcher_v1::model::ListVodAdTagDetailsResponse;
5282 /// use google_cloud_video_stitcher_v1::model::VodAdTagDetail;
5283 /// let x = ListVodAdTagDetailsResponse::new()
5284 /// .set_vod_ad_tag_details([
5285 /// VodAdTagDetail::default()/* use setters */,
5286 /// VodAdTagDetail::default()/* use (different) setters */,
5287 /// ]);
5288 /// ```
5289 pub fn set_vod_ad_tag_details<T, V>(mut self, v: T) -> Self
5290 where
5291 T: std::iter::IntoIterator<Item = V>,
5292 V: std::convert::Into<crate::model::VodAdTagDetail>,
5293 {
5294 use std::iter::Iterator;
5295 self.vod_ad_tag_details = v.into_iter().map(|i| i.into()).collect();
5296 self
5297 }
5298
5299 /// Sets the value of [next_page_token][crate::model::ListVodAdTagDetailsResponse::next_page_token].
5300 ///
5301 /// # Example
5302 /// ```ignore,no_run
5303 /// # use google_cloud_video_stitcher_v1::model::ListVodAdTagDetailsResponse;
5304 /// let x = ListVodAdTagDetailsResponse::new().set_next_page_token("example");
5305 /// ```
5306 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5307 self.next_page_token = v.into();
5308 self
5309 }
5310}
5311
5312impl wkt::message::Message for ListVodAdTagDetailsResponse {
5313 fn typename() -> &'static str {
5314 "type.googleapis.com/google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse"
5315 }
5316}
5317
5318#[doc(hidden)]
5319impl google_cloud_gax::paginator::internal::PageableResponse for ListVodAdTagDetailsResponse {
5320 type PageItem = crate::model::VodAdTagDetail;
5321
5322 fn items(self) -> std::vec::Vec<Self::PageItem> {
5323 self.vod_ad_tag_details
5324 }
5325
5326 fn next_page_token(&self) -> std::string::String {
5327 use std::clone::Clone;
5328 self.next_page_token.clone()
5329 }
5330}
5331
5332/// Request message for VideoStitcherService.getVodAdTagDetail
5333#[derive(Clone, Default, PartialEq)]
5334#[non_exhaustive]
5335pub struct GetVodAdTagDetailRequest {
5336 /// Required. The name of the ad tag detail for the specified VOD session, in
5337 /// the form of
5338 /// `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`.
5339 pub name: std::string::String,
5340
5341 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5342}
5343
5344impl GetVodAdTagDetailRequest {
5345 /// Creates a new default instance.
5346 pub fn new() -> Self {
5347 std::default::Default::default()
5348 }
5349
5350 /// Sets the value of [name][crate::model::GetVodAdTagDetailRequest::name].
5351 ///
5352 /// # Example
5353 /// ```ignore,no_run
5354 /// # use google_cloud_video_stitcher_v1::model::GetVodAdTagDetailRequest;
5355 /// # let project_id = "project_id";
5356 /// # let location_id = "location_id";
5357 /// # let vod_session_id = "vod_session_id";
5358 /// # let vod_ad_tag_detail_id = "vod_ad_tag_detail_id";
5359 /// let x = GetVodAdTagDetailRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail_id}"));
5360 /// ```
5361 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5362 self.name = v.into();
5363 self
5364 }
5365}
5366
5367impl wkt::message::Message for GetVodAdTagDetailRequest {
5368 fn typename() -> &'static str {
5369 "type.googleapis.com/google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest"
5370 }
5371}
5372
5373/// Request message for VideoStitcherService.listLiveAdTagDetails.
5374#[derive(Clone, Default, PartialEq)]
5375#[non_exhaustive]
5376pub struct ListLiveAdTagDetailsRequest {
5377 /// Required. The resource parent in the form of
5378 /// `projects/{project}/locations/{location}/liveSessions/{live_session}`.
5379 pub parent: std::string::String,
5380
5381 /// The maximum number of items to return.
5382 pub page_size: i32,
5383
5384 /// The pagination token returned from a previous List request.
5385 pub page_token: std::string::String,
5386
5387 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5388}
5389
5390impl ListLiveAdTagDetailsRequest {
5391 /// Creates a new default instance.
5392 pub fn new() -> Self {
5393 std::default::Default::default()
5394 }
5395
5396 /// Sets the value of [parent][crate::model::ListLiveAdTagDetailsRequest::parent].
5397 ///
5398 /// # Example
5399 /// ```ignore,no_run
5400 /// # use google_cloud_video_stitcher_v1::model::ListLiveAdTagDetailsRequest;
5401 /// # let project_id = "project_id";
5402 /// # let location_id = "location_id";
5403 /// # let live_session_id = "live_session_id";
5404 /// let x = ListLiveAdTagDetailsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/liveSessions/{live_session_id}"));
5405 /// ```
5406 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5407 self.parent = v.into();
5408 self
5409 }
5410
5411 /// Sets the value of [page_size][crate::model::ListLiveAdTagDetailsRequest::page_size].
5412 ///
5413 /// # Example
5414 /// ```ignore,no_run
5415 /// # use google_cloud_video_stitcher_v1::model::ListLiveAdTagDetailsRequest;
5416 /// let x = ListLiveAdTagDetailsRequest::new().set_page_size(42);
5417 /// ```
5418 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5419 self.page_size = v.into();
5420 self
5421 }
5422
5423 /// Sets the value of [page_token][crate::model::ListLiveAdTagDetailsRequest::page_token].
5424 ///
5425 /// # Example
5426 /// ```ignore,no_run
5427 /// # use google_cloud_video_stitcher_v1::model::ListLiveAdTagDetailsRequest;
5428 /// let x = ListLiveAdTagDetailsRequest::new().set_page_token("example");
5429 /// ```
5430 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5431 self.page_token = v.into();
5432 self
5433 }
5434}
5435
5436impl wkt::message::Message for ListLiveAdTagDetailsRequest {
5437 fn typename() -> &'static str {
5438 "type.googleapis.com/google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest"
5439 }
5440}
5441
5442/// Response message for VideoStitcherService.listLiveAdTagDetails.
5443#[derive(Clone, Default, PartialEq)]
5444#[non_exhaustive]
5445pub struct ListLiveAdTagDetailsResponse {
5446 /// A list of live session ad tag details.
5447 pub live_ad_tag_details: std::vec::Vec<crate::model::LiveAdTagDetail>,
5448
5449 /// The pagination token.
5450 pub next_page_token: std::string::String,
5451
5452 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5453}
5454
5455impl ListLiveAdTagDetailsResponse {
5456 /// Creates a new default instance.
5457 pub fn new() -> Self {
5458 std::default::Default::default()
5459 }
5460
5461 /// Sets the value of [live_ad_tag_details][crate::model::ListLiveAdTagDetailsResponse::live_ad_tag_details].
5462 ///
5463 /// # Example
5464 /// ```ignore,no_run
5465 /// # use google_cloud_video_stitcher_v1::model::ListLiveAdTagDetailsResponse;
5466 /// use google_cloud_video_stitcher_v1::model::LiveAdTagDetail;
5467 /// let x = ListLiveAdTagDetailsResponse::new()
5468 /// .set_live_ad_tag_details([
5469 /// LiveAdTagDetail::default()/* use setters */,
5470 /// LiveAdTagDetail::default()/* use (different) setters */,
5471 /// ]);
5472 /// ```
5473 pub fn set_live_ad_tag_details<T, V>(mut self, v: T) -> Self
5474 where
5475 T: std::iter::IntoIterator<Item = V>,
5476 V: std::convert::Into<crate::model::LiveAdTagDetail>,
5477 {
5478 use std::iter::Iterator;
5479 self.live_ad_tag_details = v.into_iter().map(|i| i.into()).collect();
5480 self
5481 }
5482
5483 /// Sets the value of [next_page_token][crate::model::ListLiveAdTagDetailsResponse::next_page_token].
5484 ///
5485 /// # Example
5486 /// ```ignore,no_run
5487 /// # use google_cloud_video_stitcher_v1::model::ListLiveAdTagDetailsResponse;
5488 /// let x = ListLiveAdTagDetailsResponse::new().set_next_page_token("example");
5489 /// ```
5490 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5491 self.next_page_token = v.into();
5492 self
5493 }
5494}
5495
5496impl wkt::message::Message for ListLiveAdTagDetailsResponse {
5497 fn typename() -> &'static str {
5498 "type.googleapis.com/google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse"
5499 }
5500}
5501
5502#[doc(hidden)]
5503impl google_cloud_gax::paginator::internal::PageableResponse for ListLiveAdTagDetailsResponse {
5504 type PageItem = crate::model::LiveAdTagDetail;
5505
5506 fn items(self) -> std::vec::Vec<Self::PageItem> {
5507 self.live_ad_tag_details
5508 }
5509
5510 fn next_page_token(&self) -> std::string::String {
5511 use std::clone::Clone;
5512 self.next_page_token.clone()
5513 }
5514}
5515
5516/// Request message for VideoStitcherService.getLiveAdTagDetail
5517#[derive(Clone, Default, PartialEq)]
5518#[non_exhaustive]
5519pub struct GetLiveAdTagDetailRequest {
5520 /// Required. The resource name in the form of
5521 /// `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`.
5522 pub name: std::string::String,
5523
5524 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5525}
5526
5527impl GetLiveAdTagDetailRequest {
5528 /// Creates a new default instance.
5529 pub fn new() -> Self {
5530 std::default::Default::default()
5531 }
5532
5533 /// Sets the value of [name][crate::model::GetLiveAdTagDetailRequest::name].
5534 ///
5535 /// # Example
5536 /// ```ignore,no_run
5537 /// # use google_cloud_video_stitcher_v1::model::GetLiveAdTagDetailRequest;
5538 /// # let project_id = "project_id";
5539 /// # let location_id = "location_id";
5540 /// # let live_session_id = "live_session_id";
5541 /// # let live_ad_tag_detail_id = "live_ad_tag_detail_id";
5542 /// let x = GetLiveAdTagDetailRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/liveSessions/{live_session_id}/liveAdTagDetails/{live_ad_tag_detail_id}"));
5543 /// ```
5544 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5545 self.name = v.into();
5546 self
5547 }
5548}
5549
5550impl wkt::message::Message for GetLiveAdTagDetailRequest {
5551 fn typename() -> &'static str {
5552 "type.googleapis.com/google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest"
5553 }
5554}
5555
5556/// Request message for VideoStitcherService.createSlate.
5557#[derive(Clone, Default, PartialEq)]
5558#[non_exhaustive]
5559pub struct CreateSlateRequest {
5560 /// Required. The project in which the slate should be created, in the form of
5561 /// `projects/{project_number}/locations/{location}`.
5562 pub parent: std::string::String,
5563
5564 /// Required. The unique identifier for the slate.
5565 /// This value should conform to RFC-1034, which restricts to
5566 /// lower-case letters, numbers, and hyphen, with the first character a
5567 /// letter, the last a letter or a number, and a 63 character maximum.
5568 pub slate_id: std::string::String,
5569
5570 /// Required. The slate to create.
5571 pub slate: std::option::Option<crate::model::Slate>,
5572
5573 /// A request ID to identify requests. Specify a unique request ID
5574 /// so that if you must retry your request, the server will know to ignore
5575 /// the request if it has already been completed. The server will guarantee
5576 /// that for at least 60 minutes since the first request.
5577 ///
5578 /// For example, consider a situation where you make an initial request and the
5579 /// request times out. If you make the request again with the same request ID,
5580 /// the server can check if original operation with the same request ID was
5581 /// received, and if so, will ignore the second request. This prevents clients
5582 /// from accidentally creating duplicate commitments.
5583 ///
5584 /// The request ID must be a valid UUID with the exception that zero UUID is
5585 /// not supported `(00000000-0000-0000-0000-000000000000)`.
5586 pub request_id: std::string::String,
5587
5588 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5589}
5590
5591impl CreateSlateRequest {
5592 /// Creates a new default instance.
5593 pub fn new() -> Self {
5594 std::default::Default::default()
5595 }
5596
5597 /// Sets the value of [parent][crate::model::CreateSlateRequest::parent].
5598 ///
5599 /// # Example
5600 /// ```ignore,no_run
5601 /// # use google_cloud_video_stitcher_v1::model::CreateSlateRequest;
5602 /// # let project_id = "project_id";
5603 /// # let location_id = "location_id";
5604 /// let x = CreateSlateRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
5605 /// ```
5606 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5607 self.parent = v.into();
5608 self
5609 }
5610
5611 /// Sets the value of [slate_id][crate::model::CreateSlateRequest::slate_id].
5612 ///
5613 /// # Example
5614 /// ```ignore,no_run
5615 /// # use google_cloud_video_stitcher_v1::model::CreateSlateRequest;
5616 /// let x = CreateSlateRequest::new().set_slate_id("example");
5617 /// ```
5618 pub fn set_slate_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5619 self.slate_id = v.into();
5620 self
5621 }
5622
5623 /// Sets the value of [slate][crate::model::CreateSlateRequest::slate].
5624 ///
5625 /// # Example
5626 /// ```ignore,no_run
5627 /// # use google_cloud_video_stitcher_v1::model::CreateSlateRequest;
5628 /// use google_cloud_video_stitcher_v1::model::Slate;
5629 /// let x = CreateSlateRequest::new().set_slate(Slate::default()/* use setters */);
5630 /// ```
5631 pub fn set_slate<T>(mut self, v: T) -> Self
5632 where
5633 T: std::convert::Into<crate::model::Slate>,
5634 {
5635 self.slate = std::option::Option::Some(v.into());
5636 self
5637 }
5638
5639 /// Sets or clears the value of [slate][crate::model::CreateSlateRequest::slate].
5640 ///
5641 /// # Example
5642 /// ```ignore,no_run
5643 /// # use google_cloud_video_stitcher_v1::model::CreateSlateRequest;
5644 /// use google_cloud_video_stitcher_v1::model::Slate;
5645 /// let x = CreateSlateRequest::new().set_or_clear_slate(Some(Slate::default()/* use setters */));
5646 /// let x = CreateSlateRequest::new().set_or_clear_slate(None::<Slate>);
5647 /// ```
5648 pub fn set_or_clear_slate<T>(mut self, v: std::option::Option<T>) -> Self
5649 where
5650 T: std::convert::Into<crate::model::Slate>,
5651 {
5652 self.slate = v.map(|x| x.into());
5653 self
5654 }
5655
5656 /// Sets the value of [request_id][crate::model::CreateSlateRequest::request_id].
5657 ///
5658 /// # Example
5659 /// ```ignore,no_run
5660 /// # use google_cloud_video_stitcher_v1::model::CreateSlateRequest;
5661 /// let x = CreateSlateRequest::new().set_request_id("example");
5662 /// ```
5663 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5664 self.request_id = v.into();
5665 self
5666 }
5667}
5668
5669impl wkt::message::Message for CreateSlateRequest {
5670 fn typename() -> &'static str {
5671 "type.googleapis.com/google.cloud.video.stitcher.v1.CreateSlateRequest"
5672 }
5673}
5674
5675/// Request message for VideoStitcherService.getSlate.
5676#[derive(Clone, Default, PartialEq)]
5677#[non_exhaustive]
5678pub struct GetSlateRequest {
5679 /// Required. The name of the slate to be retrieved, of the slate, in the form
5680 /// of `projects/{project_number}/locations/{location}/slates/{id}`.
5681 pub name: std::string::String,
5682
5683 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5684}
5685
5686impl GetSlateRequest {
5687 /// Creates a new default instance.
5688 pub fn new() -> Self {
5689 std::default::Default::default()
5690 }
5691
5692 /// Sets the value of [name][crate::model::GetSlateRequest::name].
5693 ///
5694 /// # Example
5695 /// ```ignore,no_run
5696 /// # use google_cloud_video_stitcher_v1::model::GetSlateRequest;
5697 /// # let project_id = "project_id";
5698 /// # let location_id = "location_id";
5699 /// # let slate_id = "slate_id";
5700 /// let x = GetSlateRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/slates/{slate_id}"));
5701 /// ```
5702 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5703 self.name = v.into();
5704 self
5705 }
5706}
5707
5708impl wkt::message::Message for GetSlateRequest {
5709 fn typename() -> &'static str {
5710 "type.googleapis.com/google.cloud.video.stitcher.v1.GetSlateRequest"
5711 }
5712}
5713
5714/// Request message for VideoStitcherService.listSlates.
5715#[derive(Clone, Default, PartialEq)]
5716#[non_exhaustive]
5717pub struct ListSlatesRequest {
5718 /// Required. The project to list slates, in the form of
5719 /// `projects/{project_number}/locations/{location}`.
5720 pub parent: std::string::String,
5721
5722 /// Requested page size. Server may return fewer items than requested.
5723 /// If unspecified, server will pick an appropriate default.
5724 pub page_size: i32,
5725
5726 /// A token identifying a page of results the server should return.
5727 pub page_token: std::string::String,
5728
5729 /// Filtering results
5730 pub filter: std::string::String,
5731
5732 /// Hint for how to order the results
5733 pub order_by: std::string::String,
5734
5735 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5736}
5737
5738impl ListSlatesRequest {
5739 /// Creates a new default instance.
5740 pub fn new() -> Self {
5741 std::default::Default::default()
5742 }
5743
5744 /// Sets the value of [parent][crate::model::ListSlatesRequest::parent].
5745 ///
5746 /// # Example
5747 /// ```ignore,no_run
5748 /// # use google_cloud_video_stitcher_v1::model::ListSlatesRequest;
5749 /// # let project_id = "project_id";
5750 /// # let location_id = "location_id";
5751 /// let x = ListSlatesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
5752 /// ```
5753 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5754 self.parent = v.into();
5755 self
5756 }
5757
5758 /// Sets the value of [page_size][crate::model::ListSlatesRequest::page_size].
5759 ///
5760 /// # Example
5761 /// ```ignore,no_run
5762 /// # use google_cloud_video_stitcher_v1::model::ListSlatesRequest;
5763 /// let x = ListSlatesRequest::new().set_page_size(42);
5764 /// ```
5765 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5766 self.page_size = v.into();
5767 self
5768 }
5769
5770 /// Sets the value of [page_token][crate::model::ListSlatesRequest::page_token].
5771 ///
5772 /// # Example
5773 /// ```ignore,no_run
5774 /// # use google_cloud_video_stitcher_v1::model::ListSlatesRequest;
5775 /// let x = ListSlatesRequest::new().set_page_token("example");
5776 /// ```
5777 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5778 self.page_token = v.into();
5779 self
5780 }
5781
5782 /// Sets the value of [filter][crate::model::ListSlatesRequest::filter].
5783 ///
5784 /// # Example
5785 /// ```ignore,no_run
5786 /// # use google_cloud_video_stitcher_v1::model::ListSlatesRequest;
5787 /// let x = ListSlatesRequest::new().set_filter("example");
5788 /// ```
5789 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5790 self.filter = v.into();
5791 self
5792 }
5793
5794 /// Sets the value of [order_by][crate::model::ListSlatesRequest::order_by].
5795 ///
5796 /// # Example
5797 /// ```ignore,no_run
5798 /// # use google_cloud_video_stitcher_v1::model::ListSlatesRequest;
5799 /// let x = ListSlatesRequest::new().set_order_by("example");
5800 /// ```
5801 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5802 self.order_by = v.into();
5803 self
5804 }
5805}
5806
5807impl wkt::message::Message for ListSlatesRequest {
5808 fn typename() -> &'static str {
5809 "type.googleapis.com/google.cloud.video.stitcher.v1.ListSlatesRequest"
5810 }
5811}
5812
5813/// Response message for VideoStitcherService.listSlates.
5814#[derive(Clone, Default, PartialEq)]
5815#[non_exhaustive]
5816pub struct ListSlatesResponse {
5817 /// The list of slates
5818 pub slates: std::vec::Vec<crate::model::Slate>,
5819
5820 /// A token identifying a page of results the server should return.
5821 pub next_page_token: std::string::String,
5822
5823 /// Locations that could not be reached.
5824 pub unreachable: std::vec::Vec<std::string::String>,
5825
5826 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5827}
5828
5829impl ListSlatesResponse {
5830 /// Creates a new default instance.
5831 pub fn new() -> Self {
5832 std::default::Default::default()
5833 }
5834
5835 /// Sets the value of [slates][crate::model::ListSlatesResponse::slates].
5836 ///
5837 /// # Example
5838 /// ```ignore,no_run
5839 /// # use google_cloud_video_stitcher_v1::model::ListSlatesResponse;
5840 /// use google_cloud_video_stitcher_v1::model::Slate;
5841 /// let x = ListSlatesResponse::new()
5842 /// .set_slates([
5843 /// Slate::default()/* use setters */,
5844 /// Slate::default()/* use (different) setters */,
5845 /// ]);
5846 /// ```
5847 pub fn set_slates<T, V>(mut self, v: T) -> Self
5848 where
5849 T: std::iter::IntoIterator<Item = V>,
5850 V: std::convert::Into<crate::model::Slate>,
5851 {
5852 use std::iter::Iterator;
5853 self.slates = v.into_iter().map(|i| i.into()).collect();
5854 self
5855 }
5856
5857 /// Sets the value of [next_page_token][crate::model::ListSlatesResponse::next_page_token].
5858 ///
5859 /// # Example
5860 /// ```ignore,no_run
5861 /// # use google_cloud_video_stitcher_v1::model::ListSlatesResponse;
5862 /// let x = ListSlatesResponse::new().set_next_page_token("example");
5863 /// ```
5864 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5865 self.next_page_token = v.into();
5866 self
5867 }
5868
5869 /// Sets the value of [unreachable][crate::model::ListSlatesResponse::unreachable].
5870 ///
5871 /// # Example
5872 /// ```ignore,no_run
5873 /// # use google_cloud_video_stitcher_v1::model::ListSlatesResponse;
5874 /// let x = ListSlatesResponse::new().set_unreachable(["a", "b", "c"]);
5875 /// ```
5876 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5877 where
5878 T: std::iter::IntoIterator<Item = V>,
5879 V: std::convert::Into<std::string::String>,
5880 {
5881 use std::iter::Iterator;
5882 self.unreachable = v.into_iter().map(|i| i.into()).collect();
5883 self
5884 }
5885}
5886
5887impl wkt::message::Message for ListSlatesResponse {
5888 fn typename() -> &'static str {
5889 "type.googleapis.com/google.cloud.video.stitcher.v1.ListSlatesResponse"
5890 }
5891}
5892
5893#[doc(hidden)]
5894impl google_cloud_gax::paginator::internal::PageableResponse for ListSlatesResponse {
5895 type PageItem = crate::model::Slate;
5896
5897 fn items(self) -> std::vec::Vec<Self::PageItem> {
5898 self.slates
5899 }
5900
5901 fn next_page_token(&self) -> std::string::String {
5902 use std::clone::Clone;
5903 self.next_page_token.clone()
5904 }
5905}
5906
5907/// Request message for VideoStitcherService.updateSlate.
5908#[derive(Clone, Default, PartialEq)]
5909#[non_exhaustive]
5910pub struct UpdateSlateRequest {
5911 /// Required. The resource with updated fields.
5912 pub slate: std::option::Option<crate::model::Slate>,
5913
5914 /// Required. The update mask which specifies fields which should be updated.
5915 pub update_mask: std::option::Option<wkt::FieldMask>,
5916
5917 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5918}
5919
5920impl UpdateSlateRequest {
5921 /// Creates a new default instance.
5922 pub fn new() -> Self {
5923 std::default::Default::default()
5924 }
5925
5926 /// Sets the value of [slate][crate::model::UpdateSlateRequest::slate].
5927 ///
5928 /// # Example
5929 /// ```ignore,no_run
5930 /// # use google_cloud_video_stitcher_v1::model::UpdateSlateRequest;
5931 /// use google_cloud_video_stitcher_v1::model::Slate;
5932 /// let x = UpdateSlateRequest::new().set_slate(Slate::default()/* use setters */);
5933 /// ```
5934 pub fn set_slate<T>(mut self, v: T) -> Self
5935 where
5936 T: std::convert::Into<crate::model::Slate>,
5937 {
5938 self.slate = std::option::Option::Some(v.into());
5939 self
5940 }
5941
5942 /// Sets or clears the value of [slate][crate::model::UpdateSlateRequest::slate].
5943 ///
5944 /// # Example
5945 /// ```ignore,no_run
5946 /// # use google_cloud_video_stitcher_v1::model::UpdateSlateRequest;
5947 /// use google_cloud_video_stitcher_v1::model::Slate;
5948 /// let x = UpdateSlateRequest::new().set_or_clear_slate(Some(Slate::default()/* use setters */));
5949 /// let x = UpdateSlateRequest::new().set_or_clear_slate(None::<Slate>);
5950 /// ```
5951 pub fn set_or_clear_slate<T>(mut self, v: std::option::Option<T>) -> Self
5952 where
5953 T: std::convert::Into<crate::model::Slate>,
5954 {
5955 self.slate = v.map(|x| x.into());
5956 self
5957 }
5958
5959 /// Sets the value of [update_mask][crate::model::UpdateSlateRequest::update_mask].
5960 ///
5961 /// # Example
5962 /// ```ignore,no_run
5963 /// # use google_cloud_video_stitcher_v1::model::UpdateSlateRequest;
5964 /// use wkt::FieldMask;
5965 /// let x = UpdateSlateRequest::new().set_update_mask(FieldMask::default()/* use setters */);
5966 /// ```
5967 pub fn set_update_mask<T>(mut self, v: T) -> Self
5968 where
5969 T: std::convert::Into<wkt::FieldMask>,
5970 {
5971 self.update_mask = std::option::Option::Some(v.into());
5972 self
5973 }
5974
5975 /// Sets or clears the value of [update_mask][crate::model::UpdateSlateRequest::update_mask].
5976 ///
5977 /// # Example
5978 /// ```ignore,no_run
5979 /// # use google_cloud_video_stitcher_v1::model::UpdateSlateRequest;
5980 /// use wkt::FieldMask;
5981 /// let x = UpdateSlateRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5982 /// let x = UpdateSlateRequest::new().set_or_clear_update_mask(None::<FieldMask>);
5983 /// ```
5984 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5985 where
5986 T: std::convert::Into<wkt::FieldMask>,
5987 {
5988 self.update_mask = v.map(|x| x.into());
5989 self
5990 }
5991}
5992
5993impl wkt::message::Message for UpdateSlateRequest {
5994 fn typename() -> &'static str {
5995 "type.googleapis.com/google.cloud.video.stitcher.v1.UpdateSlateRequest"
5996 }
5997}
5998
5999/// Request message for VideoStitcherService.deleteSlate.
6000#[derive(Clone, Default, PartialEq)]
6001#[non_exhaustive]
6002pub struct DeleteSlateRequest {
6003 /// Required. The name of the slate to be deleted, in the form of
6004 /// `projects/{project_number}/locations/{location}/slates/{id}`.
6005 pub name: std::string::String,
6006
6007 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6008}
6009
6010impl DeleteSlateRequest {
6011 /// Creates a new default instance.
6012 pub fn new() -> Self {
6013 std::default::Default::default()
6014 }
6015
6016 /// Sets the value of [name][crate::model::DeleteSlateRequest::name].
6017 ///
6018 /// # Example
6019 /// ```ignore,no_run
6020 /// # use google_cloud_video_stitcher_v1::model::DeleteSlateRequest;
6021 /// # let project_id = "project_id";
6022 /// # let location_id = "location_id";
6023 /// # let slate_id = "slate_id";
6024 /// let x = DeleteSlateRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/slates/{slate_id}"));
6025 /// ```
6026 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6027 self.name = v.into();
6028 self
6029 }
6030}
6031
6032impl wkt::message::Message for DeleteSlateRequest {
6033 fn typename() -> &'static str {
6034 "type.googleapis.com/google.cloud.video.stitcher.v1.DeleteSlateRequest"
6035 }
6036}
6037
6038/// Request message for VideoStitcherService.createLiveSession.
6039#[derive(Clone, Default, PartialEq)]
6040#[non_exhaustive]
6041pub struct CreateLiveSessionRequest {
6042 /// Required. The project and location in which the live session should be
6043 /// created, in the form of `projects/{project_number}/locations/{location}`.
6044 pub parent: std::string::String,
6045
6046 /// Required. Parameters for creating a live session.
6047 pub live_session: std::option::Option<crate::model::LiveSession>,
6048
6049 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6050}
6051
6052impl CreateLiveSessionRequest {
6053 /// Creates a new default instance.
6054 pub fn new() -> Self {
6055 std::default::Default::default()
6056 }
6057
6058 /// Sets the value of [parent][crate::model::CreateLiveSessionRequest::parent].
6059 ///
6060 /// # Example
6061 /// ```ignore,no_run
6062 /// # use google_cloud_video_stitcher_v1::model::CreateLiveSessionRequest;
6063 /// # let project_id = "project_id";
6064 /// # let location_id = "location_id";
6065 /// let x = CreateLiveSessionRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
6066 /// ```
6067 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6068 self.parent = v.into();
6069 self
6070 }
6071
6072 /// Sets the value of [live_session][crate::model::CreateLiveSessionRequest::live_session].
6073 ///
6074 /// # Example
6075 /// ```ignore,no_run
6076 /// # use google_cloud_video_stitcher_v1::model::CreateLiveSessionRequest;
6077 /// use google_cloud_video_stitcher_v1::model::LiveSession;
6078 /// let x = CreateLiveSessionRequest::new().set_live_session(LiveSession::default()/* use setters */);
6079 /// ```
6080 pub fn set_live_session<T>(mut self, v: T) -> Self
6081 where
6082 T: std::convert::Into<crate::model::LiveSession>,
6083 {
6084 self.live_session = std::option::Option::Some(v.into());
6085 self
6086 }
6087
6088 /// Sets or clears the value of [live_session][crate::model::CreateLiveSessionRequest::live_session].
6089 ///
6090 /// # Example
6091 /// ```ignore,no_run
6092 /// # use google_cloud_video_stitcher_v1::model::CreateLiveSessionRequest;
6093 /// use google_cloud_video_stitcher_v1::model::LiveSession;
6094 /// let x = CreateLiveSessionRequest::new().set_or_clear_live_session(Some(LiveSession::default()/* use setters */));
6095 /// let x = CreateLiveSessionRequest::new().set_or_clear_live_session(None::<LiveSession>);
6096 /// ```
6097 pub fn set_or_clear_live_session<T>(mut self, v: std::option::Option<T>) -> Self
6098 where
6099 T: std::convert::Into<crate::model::LiveSession>,
6100 {
6101 self.live_session = v.map(|x| x.into());
6102 self
6103 }
6104}
6105
6106impl wkt::message::Message for CreateLiveSessionRequest {
6107 fn typename() -> &'static str {
6108 "type.googleapis.com/google.cloud.video.stitcher.v1.CreateLiveSessionRequest"
6109 }
6110}
6111
6112/// Request message for VideoStitcherService.getSession.
6113#[derive(Clone, Default, PartialEq)]
6114#[non_exhaustive]
6115pub struct GetLiveSessionRequest {
6116 /// Required. The name of the live session, in the form of
6117 /// `projects/{project_number}/locations/{location}/liveSessions/{id}`.
6118 pub name: std::string::String,
6119
6120 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6121}
6122
6123impl GetLiveSessionRequest {
6124 /// Creates a new default instance.
6125 pub fn new() -> Self {
6126 std::default::Default::default()
6127 }
6128
6129 /// Sets the value of [name][crate::model::GetLiveSessionRequest::name].
6130 ///
6131 /// # Example
6132 /// ```ignore,no_run
6133 /// # use google_cloud_video_stitcher_v1::model::GetLiveSessionRequest;
6134 /// # let project_id = "project_id";
6135 /// # let location_id = "location_id";
6136 /// # let live_session_id = "live_session_id";
6137 /// let x = GetLiveSessionRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/liveSessions/{live_session_id}"));
6138 /// ```
6139 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6140 self.name = v.into();
6141 self
6142 }
6143}
6144
6145impl wkt::message::Message for GetLiveSessionRequest {
6146 fn typename() -> &'static str {
6147 "type.googleapis.com/google.cloud.video.stitcher.v1.GetLiveSessionRequest"
6148 }
6149}
6150
6151/// Request message for VideoStitcherService.createLiveConfig
6152#[derive(Clone, Default, PartialEq)]
6153#[non_exhaustive]
6154pub struct CreateLiveConfigRequest {
6155 /// Required. The project in which the live config should be created, in
6156 /// the form of `projects/{project_number}/locations/{location}`.
6157 pub parent: std::string::String,
6158
6159 /// Required. The unique identifier ID to use for the live config.
6160 pub live_config_id: std::string::String,
6161
6162 /// Required. The live config resource to create.
6163 pub live_config: std::option::Option<crate::model::LiveConfig>,
6164
6165 /// A request ID to identify requests. Specify a unique request ID
6166 /// so that if you must retry your request, the server will know to ignore
6167 /// the request if it has already been completed. The server will guarantee
6168 /// that for at least 60 minutes since the first request.
6169 ///
6170 /// For example, consider a situation where you make an initial request and the
6171 /// request times out. If you make the request again with the same request ID,
6172 /// the server can check if original operation with the same request ID was
6173 /// received, and if so, will ignore the second request. This prevents clients
6174 /// from accidentally creating duplicate commitments.
6175 ///
6176 /// The request ID must be a valid UUID with the exception that zero UUID is
6177 /// not supported `(00000000-0000-0000-0000-000000000000)`.
6178 pub request_id: std::string::String,
6179
6180 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6181}
6182
6183impl CreateLiveConfigRequest {
6184 /// Creates a new default instance.
6185 pub fn new() -> Self {
6186 std::default::Default::default()
6187 }
6188
6189 /// Sets the value of [parent][crate::model::CreateLiveConfigRequest::parent].
6190 ///
6191 /// # Example
6192 /// ```ignore,no_run
6193 /// # use google_cloud_video_stitcher_v1::model::CreateLiveConfigRequest;
6194 /// # let project_id = "project_id";
6195 /// # let location_id = "location_id";
6196 /// let x = CreateLiveConfigRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
6197 /// ```
6198 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6199 self.parent = v.into();
6200 self
6201 }
6202
6203 /// Sets the value of [live_config_id][crate::model::CreateLiveConfigRequest::live_config_id].
6204 ///
6205 /// # Example
6206 /// ```ignore,no_run
6207 /// # use google_cloud_video_stitcher_v1::model::CreateLiveConfigRequest;
6208 /// let x = CreateLiveConfigRequest::new().set_live_config_id("example");
6209 /// ```
6210 pub fn set_live_config_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6211 self.live_config_id = v.into();
6212 self
6213 }
6214
6215 /// Sets the value of [live_config][crate::model::CreateLiveConfigRequest::live_config].
6216 ///
6217 /// # Example
6218 /// ```ignore,no_run
6219 /// # use google_cloud_video_stitcher_v1::model::CreateLiveConfigRequest;
6220 /// use google_cloud_video_stitcher_v1::model::LiveConfig;
6221 /// let x = CreateLiveConfigRequest::new().set_live_config(LiveConfig::default()/* use setters */);
6222 /// ```
6223 pub fn set_live_config<T>(mut self, v: T) -> Self
6224 where
6225 T: std::convert::Into<crate::model::LiveConfig>,
6226 {
6227 self.live_config = std::option::Option::Some(v.into());
6228 self
6229 }
6230
6231 /// Sets or clears the value of [live_config][crate::model::CreateLiveConfigRequest::live_config].
6232 ///
6233 /// # Example
6234 /// ```ignore,no_run
6235 /// # use google_cloud_video_stitcher_v1::model::CreateLiveConfigRequest;
6236 /// use google_cloud_video_stitcher_v1::model::LiveConfig;
6237 /// let x = CreateLiveConfigRequest::new().set_or_clear_live_config(Some(LiveConfig::default()/* use setters */));
6238 /// let x = CreateLiveConfigRequest::new().set_or_clear_live_config(None::<LiveConfig>);
6239 /// ```
6240 pub fn set_or_clear_live_config<T>(mut self, v: std::option::Option<T>) -> Self
6241 where
6242 T: std::convert::Into<crate::model::LiveConfig>,
6243 {
6244 self.live_config = v.map(|x| x.into());
6245 self
6246 }
6247
6248 /// Sets the value of [request_id][crate::model::CreateLiveConfigRequest::request_id].
6249 ///
6250 /// # Example
6251 /// ```ignore,no_run
6252 /// # use google_cloud_video_stitcher_v1::model::CreateLiveConfigRequest;
6253 /// let x = CreateLiveConfigRequest::new().set_request_id("example");
6254 /// ```
6255 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6256 self.request_id = v.into();
6257 self
6258 }
6259}
6260
6261impl wkt::message::Message for CreateLiveConfigRequest {
6262 fn typename() -> &'static str {
6263 "type.googleapis.com/google.cloud.video.stitcher.v1.CreateLiveConfigRequest"
6264 }
6265}
6266
6267/// Request message for VideoStitcherService.listLiveConfig.
6268#[derive(Clone, Default, PartialEq)]
6269#[non_exhaustive]
6270pub struct ListLiveConfigsRequest {
6271 /// Required. The project that contains the list of live configs, in the
6272 /// form of `projects/{project_number}/locations/{location}`.
6273 pub parent: std::string::String,
6274
6275 /// The maximum number of items to return.
6276 pub page_size: i32,
6277
6278 /// The next_page_token value returned from a previous List request, if any.
6279 pub page_token: std::string::String,
6280
6281 /// Optional. The filter to apply to list results (see
6282 /// [Filtering](https://google.aip.dev/160)).
6283 pub filter: std::string::String,
6284
6285 /// Optional. Specifies the ordering of results following
6286 /// [Cloud API
6287 /// syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).
6288 pub order_by: std::string::String,
6289
6290 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6291}
6292
6293impl ListLiveConfigsRequest {
6294 /// Creates a new default instance.
6295 pub fn new() -> Self {
6296 std::default::Default::default()
6297 }
6298
6299 /// Sets the value of [parent][crate::model::ListLiveConfigsRequest::parent].
6300 ///
6301 /// # Example
6302 /// ```ignore,no_run
6303 /// # use google_cloud_video_stitcher_v1::model::ListLiveConfigsRequest;
6304 /// # let project_id = "project_id";
6305 /// # let location_id = "location_id";
6306 /// let x = ListLiveConfigsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
6307 /// ```
6308 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6309 self.parent = v.into();
6310 self
6311 }
6312
6313 /// Sets the value of [page_size][crate::model::ListLiveConfigsRequest::page_size].
6314 ///
6315 /// # Example
6316 /// ```ignore,no_run
6317 /// # use google_cloud_video_stitcher_v1::model::ListLiveConfigsRequest;
6318 /// let x = ListLiveConfigsRequest::new().set_page_size(42);
6319 /// ```
6320 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6321 self.page_size = v.into();
6322 self
6323 }
6324
6325 /// Sets the value of [page_token][crate::model::ListLiveConfigsRequest::page_token].
6326 ///
6327 /// # Example
6328 /// ```ignore,no_run
6329 /// # use google_cloud_video_stitcher_v1::model::ListLiveConfigsRequest;
6330 /// let x = ListLiveConfigsRequest::new().set_page_token("example");
6331 /// ```
6332 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6333 self.page_token = v.into();
6334 self
6335 }
6336
6337 /// Sets the value of [filter][crate::model::ListLiveConfigsRequest::filter].
6338 ///
6339 /// # Example
6340 /// ```ignore,no_run
6341 /// # use google_cloud_video_stitcher_v1::model::ListLiveConfigsRequest;
6342 /// let x = ListLiveConfigsRequest::new().set_filter("example");
6343 /// ```
6344 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6345 self.filter = v.into();
6346 self
6347 }
6348
6349 /// Sets the value of [order_by][crate::model::ListLiveConfigsRequest::order_by].
6350 ///
6351 /// # Example
6352 /// ```ignore,no_run
6353 /// # use google_cloud_video_stitcher_v1::model::ListLiveConfigsRequest;
6354 /// let x = ListLiveConfigsRequest::new().set_order_by("example");
6355 /// ```
6356 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6357 self.order_by = v.into();
6358 self
6359 }
6360}
6361
6362impl wkt::message::Message for ListLiveConfigsRequest {
6363 fn typename() -> &'static str {
6364 "type.googleapis.com/google.cloud.video.stitcher.v1.ListLiveConfigsRequest"
6365 }
6366}
6367
6368/// Response message for VideoStitcher.ListLiveConfig.
6369#[derive(Clone, Default, PartialEq)]
6370#[non_exhaustive]
6371pub struct ListLiveConfigsResponse {
6372 /// List of live configs.
6373 pub live_configs: std::vec::Vec<crate::model::LiveConfig>,
6374
6375 /// The pagination token.
6376 pub next_page_token: std::string::String,
6377
6378 /// Locations that could not be reached.
6379 pub unreachable: std::vec::Vec<std::string::String>,
6380
6381 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6382}
6383
6384impl ListLiveConfigsResponse {
6385 /// Creates a new default instance.
6386 pub fn new() -> Self {
6387 std::default::Default::default()
6388 }
6389
6390 /// Sets the value of [live_configs][crate::model::ListLiveConfigsResponse::live_configs].
6391 ///
6392 /// # Example
6393 /// ```ignore,no_run
6394 /// # use google_cloud_video_stitcher_v1::model::ListLiveConfigsResponse;
6395 /// use google_cloud_video_stitcher_v1::model::LiveConfig;
6396 /// let x = ListLiveConfigsResponse::new()
6397 /// .set_live_configs([
6398 /// LiveConfig::default()/* use setters */,
6399 /// LiveConfig::default()/* use (different) setters */,
6400 /// ]);
6401 /// ```
6402 pub fn set_live_configs<T, V>(mut self, v: T) -> Self
6403 where
6404 T: std::iter::IntoIterator<Item = V>,
6405 V: std::convert::Into<crate::model::LiveConfig>,
6406 {
6407 use std::iter::Iterator;
6408 self.live_configs = v.into_iter().map(|i| i.into()).collect();
6409 self
6410 }
6411
6412 /// Sets the value of [next_page_token][crate::model::ListLiveConfigsResponse::next_page_token].
6413 ///
6414 /// # Example
6415 /// ```ignore,no_run
6416 /// # use google_cloud_video_stitcher_v1::model::ListLiveConfigsResponse;
6417 /// let x = ListLiveConfigsResponse::new().set_next_page_token("example");
6418 /// ```
6419 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6420 self.next_page_token = v.into();
6421 self
6422 }
6423
6424 /// Sets the value of [unreachable][crate::model::ListLiveConfigsResponse::unreachable].
6425 ///
6426 /// # Example
6427 /// ```ignore,no_run
6428 /// # use google_cloud_video_stitcher_v1::model::ListLiveConfigsResponse;
6429 /// let x = ListLiveConfigsResponse::new().set_unreachable(["a", "b", "c"]);
6430 /// ```
6431 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6432 where
6433 T: std::iter::IntoIterator<Item = V>,
6434 V: std::convert::Into<std::string::String>,
6435 {
6436 use std::iter::Iterator;
6437 self.unreachable = v.into_iter().map(|i| i.into()).collect();
6438 self
6439 }
6440}
6441
6442impl wkt::message::Message for ListLiveConfigsResponse {
6443 fn typename() -> &'static str {
6444 "type.googleapis.com/google.cloud.video.stitcher.v1.ListLiveConfigsResponse"
6445 }
6446}
6447
6448#[doc(hidden)]
6449impl google_cloud_gax::paginator::internal::PageableResponse for ListLiveConfigsResponse {
6450 type PageItem = crate::model::LiveConfig;
6451
6452 fn items(self) -> std::vec::Vec<Self::PageItem> {
6453 self.live_configs
6454 }
6455
6456 fn next_page_token(&self) -> std::string::String {
6457 use std::clone::Clone;
6458 self.next_page_token.clone()
6459 }
6460}
6461
6462/// Request message for VideoStitcherService.getLiveConfig.
6463#[derive(Clone, Default, PartialEq)]
6464#[non_exhaustive]
6465pub struct GetLiveConfigRequest {
6466 /// Required. The name of the live config to be retrieved, in the form
6467 /// of
6468 /// `projects/{project_number}/locations/{location}/liveConfigs/{id}`.
6469 pub name: std::string::String,
6470
6471 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6472}
6473
6474impl GetLiveConfigRequest {
6475 /// Creates a new default instance.
6476 pub fn new() -> Self {
6477 std::default::Default::default()
6478 }
6479
6480 /// Sets the value of [name][crate::model::GetLiveConfigRequest::name].
6481 ///
6482 /// # Example
6483 /// ```ignore,no_run
6484 /// # use google_cloud_video_stitcher_v1::model::GetLiveConfigRequest;
6485 /// # let project_id = "project_id";
6486 /// # let location_id = "location_id";
6487 /// # let live_config_id = "live_config_id";
6488 /// let x = GetLiveConfigRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/liveConfigs/{live_config_id}"));
6489 /// ```
6490 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6491 self.name = v.into();
6492 self
6493 }
6494}
6495
6496impl wkt::message::Message for GetLiveConfigRequest {
6497 fn typename() -> &'static str {
6498 "type.googleapis.com/google.cloud.video.stitcher.v1.GetLiveConfigRequest"
6499 }
6500}
6501
6502/// Request message for VideoStitcherService.deleteLiveConfig.
6503#[derive(Clone, Default, PartialEq)]
6504#[non_exhaustive]
6505pub struct DeleteLiveConfigRequest {
6506 /// Required. The name of the live config to be deleted, in the form of
6507 /// `projects/{project_number}/locations/{location}/liveConfigs/{id}`.
6508 pub name: std::string::String,
6509
6510 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6511}
6512
6513impl DeleteLiveConfigRequest {
6514 /// Creates a new default instance.
6515 pub fn new() -> Self {
6516 std::default::Default::default()
6517 }
6518
6519 /// Sets the value of [name][crate::model::DeleteLiveConfigRequest::name].
6520 ///
6521 /// # Example
6522 /// ```ignore,no_run
6523 /// # use google_cloud_video_stitcher_v1::model::DeleteLiveConfigRequest;
6524 /// # let project_id = "project_id";
6525 /// # let location_id = "location_id";
6526 /// # let live_config_id = "live_config_id";
6527 /// let x = DeleteLiveConfigRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/liveConfigs/{live_config_id}"));
6528 /// ```
6529 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6530 self.name = v.into();
6531 self
6532 }
6533}
6534
6535impl wkt::message::Message for DeleteLiveConfigRequest {
6536 fn typename() -> &'static str {
6537 "type.googleapis.com/google.cloud.video.stitcher.v1.DeleteLiveConfigRequest"
6538 }
6539}
6540
6541/// Request message for VideoStitcherService.updateLiveConfig.
6542#[derive(Clone, Default, PartialEq)]
6543#[non_exhaustive]
6544pub struct UpdateLiveConfigRequest {
6545 /// Required. The LiveConfig resource which replaces the resource on the
6546 /// server.
6547 pub live_config: std::option::Option<crate::model::LiveConfig>,
6548
6549 /// Required. The update mask applies to the resource.
6550 /// For the `FieldMask` definition, see
6551 /// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask>
6552 pub update_mask: std::option::Option<wkt::FieldMask>,
6553
6554 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6555}
6556
6557impl UpdateLiveConfigRequest {
6558 /// Creates a new default instance.
6559 pub fn new() -> Self {
6560 std::default::Default::default()
6561 }
6562
6563 /// Sets the value of [live_config][crate::model::UpdateLiveConfigRequest::live_config].
6564 ///
6565 /// # Example
6566 /// ```ignore,no_run
6567 /// # use google_cloud_video_stitcher_v1::model::UpdateLiveConfigRequest;
6568 /// use google_cloud_video_stitcher_v1::model::LiveConfig;
6569 /// let x = UpdateLiveConfigRequest::new().set_live_config(LiveConfig::default()/* use setters */);
6570 /// ```
6571 pub fn set_live_config<T>(mut self, v: T) -> Self
6572 where
6573 T: std::convert::Into<crate::model::LiveConfig>,
6574 {
6575 self.live_config = std::option::Option::Some(v.into());
6576 self
6577 }
6578
6579 /// Sets or clears the value of [live_config][crate::model::UpdateLiveConfigRequest::live_config].
6580 ///
6581 /// # Example
6582 /// ```ignore,no_run
6583 /// # use google_cloud_video_stitcher_v1::model::UpdateLiveConfigRequest;
6584 /// use google_cloud_video_stitcher_v1::model::LiveConfig;
6585 /// let x = UpdateLiveConfigRequest::new().set_or_clear_live_config(Some(LiveConfig::default()/* use setters */));
6586 /// let x = UpdateLiveConfigRequest::new().set_or_clear_live_config(None::<LiveConfig>);
6587 /// ```
6588 pub fn set_or_clear_live_config<T>(mut self, v: std::option::Option<T>) -> Self
6589 where
6590 T: std::convert::Into<crate::model::LiveConfig>,
6591 {
6592 self.live_config = v.map(|x| x.into());
6593 self
6594 }
6595
6596 /// Sets the value of [update_mask][crate::model::UpdateLiveConfigRequest::update_mask].
6597 ///
6598 /// # Example
6599 /// ```ignore,no_run
6600 /// # use google_cloud_video_stitcher_v1::model::UpdateLiveConfigRequest;
6601 /// use wkt::FieldMask;
6602 /// let x = UpdateLiveConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6603 /// ```
6604 pub fn set_update_mask<T>(mut self, v: T) -> Self
6605 where
6606 T: std::convert::Into<wkt::FieldMask>,
6607 {
6608 self.update_mask = std::option::Option::Some(v.into());
6609 self
6610 }
6611
6612 /// Sets or clears the value of [update_mask][crate::model::UpdateLiveConfigRequest::update_mask].
6613 ///
6614 /// # Example
6615 /// ```ignore,no_run
6616 /// # use google_cloud_video_stitcher_v1::model::UpdateLiveConfigRequest;
6617 /// use wkt::FieldMask;
6618 /// let x = UpdateLiveConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6619 /// let x = UpdateLiveConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6620 /// ```
6621 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6622 where
6623 T: std::convert::Into<wkt::FieldMask>,
6624 {
6625 self.update_mask = v.map(|x| x.into());
6626 self
6627 }
6628}
6629
6630impl wkt::message::Message for UpdateLiveConfigRequest {
6631 fn typename() -> &'static str {
6632 "type.googleapis.com/google.cloud.video.stitcher.v1.UpdateLiveConfigRequest"
6633 }
6634}
6635
6636/// Request message for VideoStitcherService.createVodConfig
6637#[derive(Clone, Default, PartialEq)]
6638#[non_exhaustive]
6639pub struct CreateVodConfigRequest {
6640 /// Required. The project in which the VOD config should be created, in
6641 /// the form of `projects/{project_number}/locations/{location}`.
6642 pub parent: std::string::String,
6643
6644 /// Required. The unique identifier ID to use for the VOD config.
6645 pub vod_config_id: std::string::String,
6646
6647 /// Required. The VOD config resource to create.
6648 pub vod_config: std::option::Option<crate::model::VodConfig>,
6649
6650 /// Optional. A request ID to identify requests. Specify a unique request ID
6651 /// so that if you must retry your request, the server will know to ignore
6652 /// the request if it has already been completed. The server will guarantee
6653 /// that for at least 60 minutes since the first request.
6654 ///
6655 /// For example, consider a situation where you make an initial request and the
6656 /// request times out. If you make the request again with the same request ID,
6657 /// the server can check if original operation with the same request ID was
6658 /// received, and if so, will ignore the second request. This prevents clients
6659 /// from accidentally creating duplicate commitments.
6660 ///
6661 /// The request ID must be a valid UUID with the exception that zero UUID is
6662 /// not supported `(00000000-0000-0000-0000-000000000000)`.
6663 pub request_id: std::string::String,
6664
6665 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6666}
6667
6668impl CreateVodConfigRequest {
6669 /// Creates a new default instance.
6670 pub fn new() -> Self {
6671 std::default::Default::default()
6672 }
6673
6674 /// Sets the value of [parent][crate::model::CreateVodConfigRequest::parent].
6675 ///
6676 /// # Example
6677 /// ```ignore,no_run
6678 /// # use google_cloud_video_stitcher_v1::model::CreateVodConfigRequest;
6679 /// # let project_id = "project_id";
6680 /// # let location_id = "location_id";
6681 /// let x = CreateVodConfigRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
6682 /// ```
6683 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6684 self.parent = v.into();
6685 self
6686 }
6687
6688 /// Sets the value of [vod_config_id][crate::model::CreateVodConfigRequest::vod_config_id].
6689 ///
6690 /// # Example
6691 /// ```ignore,no_run
6692 /// # use google_cloud_video_stitcher_v1::model::CreateVodConfigRequest;
6693 /// let x = CreateVodConfigRequest::new().set_vod_config_id("example");
6694 /// ```
6695 pub fn set_vod_config_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6696 self.vod_config_id = v.into();
6697 self
6698 }
6699
6700 /// Sets the value of [vod_config][crate::model::CreateVodConfigRequest::vod_config].
6701 ///
6702 /// # Example
6703 /// ```ignore,no_run
6704 /// # use google_cloud_video_stitcher_v1::model::CreateVodConfigRequest;
6705 /// use google_cloud_video_stitcher_v1::model::VodConfig;
6706 /// let x = CreateVodConfigRequest::new().set_vod_config(VodConfig::default()/* use setters */);
6707 /// ```
6708 pub fn set_vod_config<T>(mut self, v: T) -> Self
6709 where
6710 T: std::convert::Into<crate::model::VodConfig>,
6711 {
6712 self.vod_config = std::option::Option::Some(v.into());
6713 self
6714 }
6715
6716 /// Sets or clears the value of [vod_config][crate::model::CreateVodConfigRequest::vod_config].
6717 ///
6718 /// # Example
6719 /// ```ignore,no_run
6720 /// # use google_cloud_video_stitcher_v1::model::CreateVodConfigRequest;
6721 /// use google_cloud_video_stitcher_v1::model::VodConfig;
6722 /// let x = CreateVodConfigRequest::new().set_or_clear_vod_config(Some(VodConfig::default()/* use setters */));
6723 /// let x = CreateVodConfigRequest::new().set_or_clear_vod_config(None::<VodConfig>);
6724 /// ```
6725 pub fn set_or_clear_vod_config<T>(mut self, v: std::option::Option<T>) -> Self
6726 where
6727 T: std::convert::Into<crate::model::VodConfig>,
6728 {
6729 self.vod_config = v.map(|x| x.into());
6730 self
6731 }
6732
6733 /// Sets the value of [request_id][crate::model::CreateVodConfigRequest::request_id].
6734 ///
6735 /// # Example
6736 /// ```ignore,no_run
6737 /// # use google_cloud_video_stitcher_v1::model::CreateVodConfigRequest;
6738 /// let x = CreateVodConfigRequest::new().set_request_id("example");
6739 /// ```
6740 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6741 self.request_id = v.into();
6742 self
6743 }
6744}
6745
6746impl wkt::message::Message for CreateVodConfigRequest {
6747 fn typename() -> &'static str {
6748 "type.googleapis.com/google.cloud.video.stitcher.v1.CreateVodConfigRequest"
6749 }
6750}
6751
6752/// Request message for VideoStitcherService.listVodConfig.
6753#[derive(Clone, Default, PartialEq)]
6754#[non_exhaustive]
6755pub struct ListVodConfigsRequest {
6756 /// Required. The project that contains the list of VOD configs, in the
6757 /// form of `projects/{project_number}/locations/{location}`.
6758 pub parent: std::string::String,
6759
6760 /// Optional. The maximum number of items to return.
6761 pub page_size: i32,
6762
6763 /// Optional. The next_page_token value returned from a previous List request,
6764 /// if any.
6765 pub page_token: std::string::String,
6766
6767 /// Optional. The filter to apply to list results (see
6768 /// [Filtering](https://google.aip.dev/160)).
6769 pub filter: std::string::String,
6770
6771 /// Optional. Specifies the ordering of results following
6772 /// [Cloud API
6773 /// syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).
6774 pub order_by: std::string::String,
6775
6776 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6777}
6778
6779impl ListVodConfigsRequest {
6780 /// Creates a new default instance.
6781 pub fn new() -> Self {
6782 std::default::Default::default()
6783 }
6784
6785 /// Sets the value of [parent][crate::model::ListVodConfigsRequest::parent].
6786 ///
6787 /// # Example
6788 /// ```ignore,no_run
6789 /// # use google_cloud_video_stitcher_v1::model::ListVodConfigsRequest;
6790 /// # let project_id = "project_id";
6791 /// # let location_id = "location_id";
6792 /// let x = ListVodConfigsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
6793 /// ```
6794 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6795 self.parent = v.into();
6796 self
6797 }
6798
6799 /// Sets the value of [page_size][crate::model::ListVodConfigsRequest::page_size].
6800 ///
6801 /// # Example
6802 /// ```ignore,no_run
6803 /// # use google_cloud_video_stitcher_v1::model::ListVodConfigsRequest;
6804 /// let x = ListVodConfigsRequest::new().set_page_size(42);
6805 /// ```
6806 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6807 self.page_size = v.into();
6808 self
6809 }
6810
6811 /// Sets the value of [page_token][crate::model::ListVodConfigsRequest::page_token].
6812 ///
6813 /// # Example
6814 /// ```ignore,no_run
6815 /// # use google_cloud_video_stitcher_v1::model::ListVodConfigsRequest;
6816 /// let x = ListVodConfigsRequest::new().set_page_token("example");
6817 /// ```
6818 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6819 self.page_token = v.into();
6820 self
6821 }
6822
6823 /// Sets the value of [filter][crate::model::ListVodConfigsRequest::filter].
6824 ///
6825 /// # Example
6826 /// ```ignore,no_run
6827 /// # use google_cloud_video_stitcher_v1::model::ListVodConfigsRequest;
6828 /// let x = ListVodConfigsRequest::new().set_filter("example");
6829 /// ```
6830 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6831 self.filter = v.into();
6832 self
6833 }
6834
6835 /// Sets the value of [order_by][crate::model::ListVodConfigsRequest::order_by].
6836 ///
6837 /// # Example
6838 /// ```ignore,no_run
6839 /// # use google_cloud_video_stitcher_v1::model::ListVodConfigsRequest;
6840 /// let x = ListVodConfigsRequest::new().set_order_by("example");
6841 /// ```
6842 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6843 self.order_by = v.into();
6844 self
6845 }
6846}
6847
6848impl wkt::message::Message for ListVodConfigsRequest {
6849 fn typename() -> &'static str {
6850 "type.googleapis.com/google.cloud.video.stitcher.v1.ListVodConfigsRequest"
6851 }
6852}
6853
6854/// Response message for VideoStitcher.ListVodConfig.
6855#[derive(Clone, Default, PartialEq)]
6856#[non_exhaustive]
6857pub struct ListVodConfigsResponse {
6858 /// List of VOD configs.
6859 pub vod_configs: std::vec::Vec<crate::model::VodConfig>,
6860
6861 /// The pagination token.
6862 pub next_page_token: std::string::String,
6863
6864 /// Locations that could not be reached.
6865 pub unreachable: std::vec::Vec<std::string::String>,
6866
6867 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6868}
6869
6870impl ListVodConfigsResponse {
6871 /// Creates a new default instance.
6872 pub fn new() -> Self {
6873 std::default::Default::default()
6874 }
6875
6876 /// Sets the value of [vod_configs][crate::model::ListVodConfigsResponse::vod_configs].
6877 ///
6878 /// # Example
6879 /// ```ignore,no_run
6880 /// # use google_cloud_video_stitcher_v1::model::ListVodConfigsResponse;
6881 /// use google_cloud_video_stitcher_v1::model::VodConfig;
6882 /// let x = ListVodConfigsResponse::new()
6883 /// .set_vod_configs([
6884 /// VodConfig::default()/* use setters */,
6885 /// VodConfig::default()/* use (different) setters */,
6886 /// ]);
6887 /// ```
6888 pub fn set_vod_configs<T, V>(mut self, v: T) -> Self
6889 where
6890 T: std::iter::IntoIterator<Item = V>,
6891 V: std::convert::Into<crate::model::VodConfig>,
6892 {
6893 use std::iter::Iterator;
6894 self.vod_configs = v.into_iter().map(|i| i.into()).collect();
6895 self
6896 }
6897
6898 /// Sets the value of [next_page_token][crate::model::ListVodConfigsResponse::next_page_token].
6899 ///
6900 /// # Example
6901 /// ```ignore,no_run
6902 /// # use google_cloud_video_stitcher_v1::model::ListVodConfigsResponse;
6903 /// let x = ListVodConfigsResponse::new().set_next_page_token("example");
6904 /// ```
6905 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6906 self.next_page_token = v.into();
6907 self
6908 }
6909
6910 /// Sets the value of [unreachable][crate::model::ListVodConfigsResponse::unreachable].
6911 ///
6912 /// # Example
6913 /// ```ignore,no_run
6914 /// # use google_cloud_video_stitcher_v1::model::ListVodConfigsResponse;
6915 /// let x = ListVodConfigsResponse::new().set_unreachable(["a", "b", "c"]);
6916 /// ```
6917 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6918 where
6919 T: std::iter::IntoIterator<Item = V>,
6920 V: std::convert::Into<std::string::String>,
6921 {
6922 use std::iter::Iterator;
6923 self.unreachable = v.into_iter().map(|i| i.into()).collect();
6924 self
6925 }
6926}
6927
6928impl wkt::message::Message for ListVodConfigsResponse {
6929 fn typename() -> &'static str {
6930 "type.googleapis.com/google.cloud.video.stitcher.v1.ListVodConfigsResponse"
6931 }
6932}
6933
6934#[doc(hidden)]
6935impl google_cloud_gax::paginator::internal::PageableResponse for ListVodConfigsResponse {
6936 type PageItem = crate::model::VodConfig;
6937
6938 fn items(self) -> std::vec::Vec<Self::PageItem> {
6939 self.vod_configs
6940 }
6941
6942 fn next_page_token(&self) -> std::string::String {
6943 use std::clone::Clone;
6944 self.next_page_token.clone()
6945 }
6946}
6947
6948/// Request message for VideoStitcherService.getVodConfig.
6949#[derive(Clone, Default, PartialEq)]
6950#[non_exhaustive]
6951pub struct GetVodConfigRequest {
6952 /// Required. The name of the VOD config to be retrieved, in the form
6953 /// of `projects/{project_number}/locations/{location}/vodConfigs/{id}`.
6954 pub name: std::string::String,
6955
6956 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6957}
6958
6959impl GetVodConfigRequest {
6960 /// Creates a new default instance.
6961 pub fn new() -> Self {
6962 std::default::Default::default()
6963 }
6964
6965 /// Sets the value of [name][crate::model::GetVodConfigRequest::name].
6966 ///
6967 /// # Example
6968 /// ```ignore,no_run
6969 /// # use google_cloud_video_stitcher_v1::model::GetVodConfigRequest;
6970 /// # let project_id = "project_id";
6971 /// # let location_id = "location_id";
6972 /// # let vod_config_id = "vod_config_id";
6973 /// let x = GetVodConfigRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/vodConfigs/{vod_config_id}"));
6974 /// ```
6975 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6976 self.name = v.into();
6977 self
6978 }
6979}
6980
6981impl wkt::message::Message for GetVodConfigRequest {
6982 fn typename() -> &'static str {
6983 "type.googleapis.com/google.cloud.video.stitcher.v1.GetVodConfigRequest"
6984 }
6985}
6986
6987/// Request message for VideoStitcherService.deleteVodConfig.
6988#[derive(Clone, Default, PartialEq)]
6989#[non_exhaustive]
6990pub struct DeleteVodConfigRequest {
6991 /// Required. The name of the VOD config to be deleted, in the form of
6992 /// `projects/{project_number}/locations/{location}/vodConfigs/{id}`.
6993 pub name: std::string::String,
6994
6995 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6996}
6997
6998impl DeleteVodConfigRequest {
6999 /// Creates a new default instance.
7000 pub fn new() -> Self {
7001 std::default::Default::default()
7002 }
7003
7004 /// Sets the value of [name][crate::model::DeleteVodConfigRequest::name].
7005 ///
7006 /// # Example
7007 /// ```ignore,no_run
7008 /// # use google_cloud_video_stitcher_v1::model::DeleteVodConfigRequest;
7009 /// # let project_id = "project_id";
7010 /// # let location_id = "location_id";
7011 /// # let vod_config_id = "vod_config_id";
7012 /// let x = DeleteVodConfigRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/vodConfigs/{vod_config_id}"));
7013 /// ```
7014 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7015 self.name = v.into();
7016 self
7017 }
7018}
7019
7020impl wkt::message::Message for DeleteVodConfigRequest {
7021 fn typename() -> &'static str {
7022 "type.googleapis.com/google.cloud.video.stitcher.v1.DeleteVodConfigRequest"
7023 }
7024}
7025
7026/// Request message for VideoStitcherService.updateVodConfig.
7027#[derive(Clone, Default, PartialEq)]
7028#[non_exhaustive]
7029pub struct UpdateVodConfigRequest {
7030 /// Required. The VOD config resource which replaces the resource on the
7031 /// server.
7032 pub vod_config: std::option::Option<crate::model::VodConfig>,
7033
7034 /// Required. The update mask applies to the resource.
7035 /// For the `FieldMask` definition, see
7036 /// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask>
7037 pub update_mask: std::option::Option<wkt::FieldMask>,
7038
7039 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7040}
7041
7042impl UpdateVodConfigRequest {
7043 /// Creates a new default instance.
7044 pub fn new() -> Self {
7045 std::default::Default::default()
7046 }
7047
7048 /// Sets the value of [vod_config][crate::model::UpdateVodConfigRequest::vod_config].
7049 ///
7050 /// # Example
7051 /// ```ignore,no_run
7052 /// # use google_cloud_video_stitcher_v1::model::UpdateVodConfigRequest;
7053 /// use google_cloud_video_stitcher_v1::model::VodConfig;
7054 /// let x = UpdateVodConfigRequest::new().set_vod_config(VodConfig::default()/* use setters */);
7055 /// ```
7056 pub fn set_vod_config<T>(mut self, v: T) -> Self
7057 where
7058 T: std::convert::Into<crate::model::VodConfig>,
7059 {
7060 self.vod_config = std::option::Option::Some(v.into());
7061 self
7062 }
7063
7064 /// Sets or clears the value of [vod_config][crate::model::UpdateVodConfigRequest::vod_config].
7065 ///
7066 /// # Example
7067 /// ```ignore,no_run
7068 /// # use google_cloud_video_stitcher_v1::model::UpdateVodConfigRequest;
7069 /// use google_cloud_video_stitcher_v1::model::VodConfig;
7070 /// let x = UpdateVodConfigRequest::new().set_or_clear_vod_config(Some(VodConfig::default()/* use setters */));
7071 /// let x = UpdateVodConfigRequest::new().set_or_clear_vod_config(None::<VodConfig>);
7072 /// ```
7073 pub fn set_or_clear_vod_config<T>(mut self, v: std::option::Option<T>) -> Self
7074 where
7075 T: std::convert::Into<crate::model::VodConfig>,
7076 {
7077 self.vod_config = v.map(|x| x.into());
7078 self
7079 }
7080
7081 /// Sets the value of [update_mask][crate::model::UpdateVodConfigRequest::update_mask].
7082 ///
7083 /// # Example
7084 /// ```ignore,no_run
7085 /// # use google_cloud_video_stitcher_v1::model::UpdateVodConfigRequest;
7086 /// use wkt::FieldMask;
7087 /// let x = UpdateVodConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
7088 /// ```
7089 pub fn set_update_mask<T>(mut self, v: T) -> Self
7090 where
7091 T: std::convert::Into<wkt::FieldMask>,
7092 {
7093 self.update_mask = std::option::Option::Some(v.into());
7094 self
7095 }
7096
7097 /// Sets or clears the value of [update_mask][crate::model::UpdateVodConfigRequest::update_mask].
7098 ///
7099 /// # Example
7100 /// ```ignore,no_run
7101 /// # use google_cloud_video_stitcher_v1::model::UpdateVodConfigRequest;
7102 /// use wkt::FieldMask;
7103 /// let x = UpdateVodConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
7104 /// let x = UpdateVodConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
7105 /// ```
7106 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7107 where
7108 T: std::convert::Into<wkt::FieldMask>,
7109 {
7110 self.update_mask = v.map(|x| x.into());
7111 self
7112 }
7113}
7114
7115impl wkt::message::Message for UpdateVodConfigRequest {
7116 fn typename() -> &'static str {
7117 "type.googleapis.com/google.cloud.video.stitcher.v1.UpdateVodConfigRequest"
7118 }
7119}
7120
7121/// Represents the metadata of the long-running operation.
7122#[derive(Clone, Default, PartialEq)]
7123#[non_exhaustive]
7124pub struct OperationMetadata {
7125 /// The time the operation was created.
7126 pub create_time: std::option::Option<wkt::Timestamp>,
7127
7128 /// The time the operation finished running.
7129 pub end_time: std::option::Option<wkt::Timestamp>,
7130
7131 /// Server-defined resource path for the target of the operation.
7132 pub target: std::string::String,
7133
7134 /// Name of the verb executed by the operation.
7135 pub verb: std::string::String,
7136
7137 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7138}
7139
7140impl OperationMetadata {
7141 /// Creates a new default instance.
7142 pub fn new() -> Self {
7143 std::default::Default::default()
7144 }
7145
7146 /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
7147 ///
7148 /// # Example
7149 /// ```ignore,no_run
7150 /// # use google_cloud_video_stitcher_v1::model::OperationMetadata;
7151 /// use wkt::Timestamp;
7152 /// let x = OperationMetadata::new().set_create_time(Timestamp::default()/* use setters */);
7153 /// ```
7154 pub fn set_create_time<T>(mut self, v: T) -> Self
7155 where
7156 T: std::convert::Into<wkt::Timestamp>,
7157 {
7158 self.create_time = std::option::Option::Some(v.into());
7159 self
7160 }
7161
7162 /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
7163 ///
7164 /// # Example
7165 /// ```ignore,no_run
7166 /// # use google_cloud_video_stitcher_v1::model::OperationMetadata;
7167 /// use wkt::Timestamp;
7168 /// let x = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
7169 /// let x = OperationMetadata::new().set_or_clear_create_time(None::<Timestamp>);
7170 /// ```
7171 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7172 where
7173 T: std::convert::Into<wkt::Timestamp>,
7174 {
7175 self.create_time = v.map(|x| x.into());
7176 self
7177 }
7178
7179 /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
7180 ///
7181 /// # Example
7182 /// ```ignore,no_run
7183 /// # use google_cloud_video_stitcher_v1::model::OperationMetadata;
7184 /// use wkt::Timestamp;
7185 /// let x = OperationMetadata::new().set_end_time(Timestamp::default()/* use setters */);
7186 /// ```
7187 pub fn set_end_time<T>(mut self, v: T) -> Self
7188 where
7189 T: std::convert::Into<wkt::Timestamp>,
7190 {
7191 self.end_time = std::option::Option::Some(v.into());
7192 self
7193 }
7194
7195 /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
7196 ///
7197 /// # Example
7198 /// ```ignore,no_run
7199 /// # use google_cloud_video_stitcher_v1::model::OperationMetadata;
7200 /// use wkt::Timestamp;
7201 /// let x = OperationMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
7202 /// let x = OperationMetadata::new().set_or_clear_end_time(None::<Timestamp>);
7203 /// ```
7204 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
7205 where
7206 T: std::convert::Into<wkt::Timestamp>,
7207 {
7208 self.end_time = v.map(|x| x.into());
7209 self
7210 }
7211
7212 /// Sets the value of [target][crate::model::OperationMetadata::target].
7213 ///
7214 /// # Example
7215 /// ```ignore,no_run
7216 /// # use google_cloud_video_stitcher_v1::model::OperationMetadata;
7217 /// let x = OperationMetadata::new().set_target("example");
7218 /// ```
7219 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7220 self.target = v.into();
7221 self
7222 }
7223
7224 /// Sets the value of [verb][crate::model::OperationMetadata::verb].
7225 ///
7226 /// # Example
7227 /// ```ignore,no_run
7228 /// # use google_cloud_video_stitcher_v1::model::OperationMetadata;
7229 /// let x = OperationMetadata::new().set_verb("example");
7230 /// ```
7231 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7232 self.verb = v.into();
7233 self
7234 }
7235}
7236
7237impl wkt::message::Message for OperationMetadata {
7238 fn typename() -> &'static str {
7239 "type.googleapis.com/google.cloud.video.stitcher.v1.OperationMetadata"
7240 }
7241}
7242
7243/// Metadata used to register VOD configs.
7244#[derive(Clone, Default, PartialEq)]
7245#[non_exhaustive]
7246pub struct VodConfig {
7247 /// Output only. The resource name of the VOD config, in the form of
7248 /// `projects/{project}/locations/{location}/vodConfigs/{id}`.
7249 pub name: std::string::String,
7250
7251 /// Required. Source URI for the VOD stream manifest.
7252 pub source_uri: std::string::String,
7253
7254 /// Required. The default ad tag associated with this VOD config.
7255 pub ad_tag_uri: std::string::String,
7256
7257 /// Optional. Google Ad Manager (GAM) metadata.
7258 pub gam_vod_config: std::option::Option<crate::model::GamVodConfig>,
7259
7260 /// Output only. State of the VOD config.
7261 pub state: crate::model::vod_config::State,
7262
7263 /// Options for fetching source manifests and segments.
7264 pub source_fetch_options: std::option::Option<crate::model::FetchOptions>,
7265
7266 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7267}
7268
7269impl VodConfig {
7270 /// Creates a new default instance.
7271 pub fn new() -> Self {
7272 std::default::Default::default()
7273 }
7274
7275 /// Sets the value of [name][crate::model::VodConfig::name].
7276 ///
7277 /// # Example
7278 /// ```ignore,no_run
7279 /// # use google_cloud_video_stitcher_v1::model::VodConfig;
7280 /// # let project_id = "project_id";
7281 /// # let location_id = "location_id";
7282 /// # let vod_config_id = "vod_config_id";
7283 /// let x = VodConfig::new().set_name(format!("projects/{project_id}/locations/{location_id}/vodConfigs/{vod_config_id}"));
7284 /// ```
7285 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7286 self.name = v.into();
7287 self
7288 }
7289
7290 /// Sets the value of [source_uri][crate::model::VodConfig::source_uri].
7291 ///
7292 /// # Example
7293 /// ```ignore,no_run
7294 /// # use google_cloud_video_stitcher_v1::model::VodConfig;
7295 /// let x = VodConfig::new().set_source_uri("example");
7296 /// ```
7297 pub fn set_source_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7298 self.source_uri = v.into();
7299 self
7300 }
7301
7302 /// Sets the value of [ad_tag_uri][crate::model::VodConfig::ad_tag_uri].
7303 ///
7304 /// # Example
7305 /// ```ignore,no_run
7306 /// # use google_cloud_video_stitcher_v1::model::VodConfig;
7307 /// let x = VodConfig::new().set_ad_tag_uri("example");
7308 /// ```
7309 pub fn set_ad_tag_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7310 self.ad_tag_uri = v.into();
7311 self
7312 }
7313
7314 /// Sets the value of [gam_vod_config][crate::model::VodConfig::gam_vod_config].
7315 ///
7316 /// # Example
7317 /// ```ignore,no_run
7318 /// # use google_cloud_video_stitcher_v1::model::VodConfig;
7319 /// use google_cloud_video_stitcher_v1::model::GamVodConfig;
7320 /// let x = VodConfig::new().set_gam_vod_config(GamVodConfig::default()/* use setters */);
7321 /// ```
7322 pub fn set_gam_vod_config<T>(mut self, v: T) -> Self
7323 where
7324 T: std::convert::Into<crate::model::GamVodConfig>,
7325 {
7326 self.gam_vod_config = std::option::Option::Some(v.into());
7327 self
7328 }
7329
7330 /// Sets or clears the value of [gam_vod_config][crate::model::VodConfig::gam_vod_config].
7331 ///
7332 /// # Example
7333 /// ```ignore,no_run
7334 /// # use google_cloud_video_stitcher_v1::model::VodConfig;
7335 /// use google_cloud_video_stitcher_v1::model::GamVodConfig;
7336 /// let x = VodConfig::new().set_or_clear_gam_vod_config(Some(GamVodConfig::default()/* use setters */));
7337 /// let x = VodConfig::new().set_or_clear_gam_vod_config(None::<GamVodConfig>);
7338 /// ```
7339 pub fn set_or_clear_gam_vod_config<T>(mut self, v: std::option::Option<T>) -> Self
7340 where
7341 T: std::convert::Into<crate::model::GamVodConfig>,
7342 {
7343 self.gam_vod_config = v.map(|x| x.into());
7344 self
7345 }
7346
7347 /// Sets the value of [state][crate::model::VodConfig::state].
7348 ///
7349 /// # Example
7350 /// ```ignore,no_run
7351 /// # use google_cloud_video_stitcher_v1::model::VodConfig;
7352 /// use google_cloud_video_stitcher_v1::model::vod_config::State;
7353 /// let x0 = VodConfig::new().set_state(State::Creating);
7354 /// let x1 = VodConfig::new().set_state(State::Ready);
7355 /// let x2 = VodConfig::new().set_state(State::Deleting);
7356 /// ```
7357 pub fn set_state<T: std::convert::Into<crate::model::vod_config::State>>(
7358 mut self,
7359 v: T,
7360 ) -> Self {
7361 self.state = v.into();
7362 self
7363 }
7364
7365 /// Sets the value of [source_fetch_options][crate::model::VodConfig::source_fetch_options].
7366 ///
7367 /// # Example
7368 /// ```ignore,no_run
7369 /// # use google_cloud_video_stitcher_v1::model::VodConfig;
7370 /// use google_cloud_video_stitcher_v1::model::FetchOptions;
7371 /// let x = VodConfig::new().set_source_fetch_options(FetchOptions::default()/* use setters */);
7372 /// ```
7373 pub fn set_source_fetch_options<T>(mut self, v: T) -> Self
7374 where
7375 T: std::convert::Into<crate::model::FetchOptions>,
7376 {
7377 self.source_fetch_options = std::option::Option::Some(v.into());
7378 self
7379 }
7380
7381 /// Sets or clears the value of [source_fetch_options][crate::model::VodConfig::source_fetch_options].
7382 ///
7383 /// # Example
7384 /// ```ignore,no_run
7385 /// # use google_cloud_video_stitcher_v1::model::VodConfig;
7386 /// use google_cloud_video_stitcher_v1::model::FetchOptions;
7387 /// let x = VodConfig::new().set_or_clear_source_fetch_options(Some(FetchOptions::default()/* use setters */));
7388 /// let x = VodConfig::new().set_or_clear_source_fetch_options(None::<FetchOptions>);
7389 /// ```
7390 pub fn set_or_clear_source_fetch_options<T>(mut self, v: std::option::Option<T>) -> Self
7391 where
7392 T: std::convert::Into<crate::model::FetchOptions>,
7393 {
7394 self.source_fetch_options = v.map(|x| x.into());
7395 self
7396 }
7397}
7398
7399impl wkt::message::Message for VodConfig {
7400 fn typename() -> &'static str {
7401 "type.googleapis.com/google.cloud.video.stitcher.v1.VodConfig"
7402 }
7403}
7404
7405/// Defines additional types related to [VodConfig].
7406pub mod vod_config {
7407 #[allow(unused_imports)]
7408 use super::*;
7409
7410 /// State of the VOD config.
7411 ///
7412 /// # Working with unknown values
7413 ///
7414 /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7415 /// additional enum variants at any time. Adding new variants is not considered
7416 /// a breaking change. Applications should write their code in anticipation of:
7417 ///
7418 /// - New values appearing in future releases of the client library, **and**
7419 /// - New values received dynamically, without application changes.
7420 ///
7421 /// Please consult the [Working with enums] section in the user guide for some
7422 /// guidelines.
7423 ///
7424 /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
7425 #[derive(Clone, Debug, PartialEq)]
7426 #[non_exhaustive]
7427 pub enum State {
7428 /// State is not specified.
7429 Unspecified,
7430 /// VOD config is being created.
7431 Creating,
7432 /// VOD config is ready for use.
7433 Ready,
7434 /// VOD config is queued up for deletion.
7435 Deleting,
7436 /// If set, the enum was initialized with an unknown value.
7437 ///
7438 /// Applications can examine the value using [State::value] or
7439 /// [State::name].
7440 UnknownValue(state::UnknownValue),
7441 }
7442
7443 #[doc(hidden)]
7444 pub mod state {
7445 #[allow(unused_imports)]
7446 use super::*;
7447 #[derive(Clone, Debug, PartialEq)]
7448 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7449 }
7450
7451 impl State {
7452 /// Gets the enum value.
7453 ///
7454 /// Returns `None` if the enum contains an unknown value deserialized from
7455 /// the string representation of enums.
7456 pub fn value(&self) -> std::option::Option<i32> {
7457 match self {
7458 Self::Unspecified => std::option::Option::Some(0),
7459 Self::Creating => std::option::Option::Some(1),
7460 Self::Ready => std::option::Option::Some(2),
7461 Self::Deleting => std::option::Option::Some(3),
7462 Self::UnknownValue(u) => u.0.value(),
7463 }
7464 }
7465
7466 /// Gets the enum value as a string.
7467 ///
7468 /// Returns `None` if the enum contains an unknown value deserialized from
7469 /// the integer representation of enums.
7470 pub fn name(&self) -> std::option::Option<&str> {
7471 match self {
7472 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
7473 Self::Creating => std::option::Option::Some("CREATING"),
7474 Self::Ready => std::option::Option::Some("READY"),
7475 Self::Deleting => std::option::Option::Some("DELETING"),
7476 Self::UnknownValue(u) => u.0.name(),
7477 }
7478 }
7479 }
7480
7481 impl std::default::Default for State {
7482 fn default() -> Self {
7483 use std::convert::From;
7484 Self::from(0)
7485 }
7486 }
7487
7488 impl std::fmt::Display for State {
7489 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7490 wkt::internal::display_enum(f, self.name(), self.value())
7491 }
7492 }
7493
7494 impl std::convert::From<i32> for State {
7495 fn from(value: i32) -> Self {
7496 match value {
7497 0 => Self::Unspecified,
7498 1 => Self::Creating,
7499 2 => Self::Ready,
7500 3 => Self::Deleting,
7501 _ => Self::UnknownValue(state::UnknownValue(
7502 wkt::internal::UnknownEnumValue::Integer(value),
7503 )),
7504 }
7505 }
7506 }
7507
7508 impl std::convert::From<&str> for State {
7509 fn from(value: &str) -> Self {
7510 use std::string::ToString;
7511 match value {
7512 "STATE_UNSPECIFIED" => Self::Unspecified,
7513 "CREATING" => Self::Creating,
7514 "READY" => Self::Ready,
7515 "DELETING" => Self::Deleting,
7516 _ => Self::UnknownValue(state::UnknownValue(
7517 wkt::internal::UnknownEnumValue::String(value.to_string()),
7518 )),
7519 }
7520 }
7521 }
7522
7523 impl serde::ser::Serialize for State {
7524 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7525 where
7526 S: serde::Serializer,
7527 {
7528 match self {
7529 Self::Unspecified => serializer.serialize_i32(0),
7530 Self::Creating => serializer.serialize_i32(1),
7531 Self::Ready => serializer.serialize_i32(2),
7532 Self::Deleting => serializer.serialize_i32(3),
7533 Self::UnknownValue(u) => u.0.serialize(serializer),
7534 }
7535 }
7536 }
7537
7538 impl<'de> serde::de::Deserialize<'de> for State {
7539 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7540 where
7541 D: serde::Deserializer<'de>,
7542 {
7543 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
7544 ".google.cloud.video.stitcher.v1.VodConfig.State",
7545 ))
7546 }
7547 }
7548}
7549
7550/// Metadata used for GAM ad decisioning.
7551#[derive(Clone, Default, PartialEq)]
7552#[non_exhaustive]
7553pub struct GamVodConfig {
7554 /// Required. Ad Manager network code to associate with the VOD config.
7555 pub network_code: std::string::String,
7556
7557 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7558}
7559
7560impl GamVodConfig {
7561 /// Creates a new default instance.
7562 pub fn new() -> Self {
7563 std::default::Default::default()
7564 }
7565
7566 /// Sets the value of [network_code][crate::model::GamVodConfig::network_code].
7567 ///
7568 /// # Example
7569 /// ```ignore,no_run
7570 /// # use google_cloud_video_stitcher_v1::model::GamVodConfig;
7571 /// let x = GamVodConfig::new().set_network_code("example");
7572 /// ```
7573 pub fn set_network_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7574 self.network_code = v.into();
7575 self
7576 }
7577}
7578
7579impl wkt::message::Message for GamVodConfig {
7580 fn typename() -> &'static str {
7581 "type.googleapis.com/google.cloud.video.stitcher.v1.GamVodConfig"
7582 }
7583}
7584
7585/// Determines the ad tracking policy.
7586///
7587/// # Working with unknown values
7588///
7589/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7590/// additional enum variants at any time. Adding new variants is not considered
7591/// a breaking change. Applications should write their code in anticipation of:
7592///
7593/// - New values appearing in future releases of the client library, **and**
7594/// - New values received dynamically, without application changes.
7595///
7596/// Please consult the [Working with enums] section in the user guide for some
7597/// guidelines.
7598///
7599/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
7600#[derive(Clone, Debug, PartialEq)]
7601#[non_exhaustive]
7602pub enum AdTracking {
7603 /// The ad tracking policy is not specified.
7604 Unspecified,
7605 /// Client-side ad tracking is specified. The client player is expected to
7606 /// trigger playback and activity events itself.
7607 Client,
7608 /// The Video Stitcher API will trigger playback events on behalf of
7609 /// the client player.
7610 Server,
7611 /// If set, the enum was initialized with an unknown value.
7612 ///
7613 /// Applications can examine the value using [AdTracking::value] or
7614 /// [AdTracking::name].
7615 UnknownValue(ad_tracking::UnknownValue),
7616}
7617
7618#[doc(hidden)]
7619pub mod ad_tracking {
7620 #[allow(unused_imports)]
7621 use super::*;
7622 #[derive(Clone, Debug, PartialEq)]
7623 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7624}
7625
7626impl AdTracking {
7627 /// Gets the enum value.
7628 ///
7629 /// Returns `None` if the enum contains an unknown value deserialized from
7630 /// the string representation of enums.
7631 pub fn value(&self) -> std::option::Option<i32> {
7632 match self {
7633 Self::Unspecified => std::option::Option::Some(0),
7634 Self::Client => std::option::Option::Some(1),
7635 Self::Server => std::option::Option::Some(2),
7636 Self::UnknownValue(u) => u.0.value(),
7637 }
7638 }
7639
7640 /// Gets the enum value as a string.
7641 ///
7642 /// Returns `None` if the enum contains an unknown value deserialized from
7643 /// the integer representation of enums.
7644 pub fn name(&self) -> std::option::Option<&str> {
7645 match self {
7646 Self::Unspecified => std::option::Option::Some("AD_TRACKING_UNSPECIFIED"),
7647 Self::Client => std::option::Option::Some("CLIENT"),
7648 Self::Server => std::option::Option::Some("SERVER"),
7649 Self::UnknownValue(u) => u.0.name(),
7650 }
7651 }
7652}
7653
7654impl std::default::Default for AdTracking {
7655 fn default() -> Self {
7656 use std::convert::From;
7657 Self::from(0)
7658 }
7659}
7660
7661impl std::fmt::Display for AdTracking {
7662 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7663 wkt::internal::display_enum(f, self.name(), self.value())
7664 }
7665}
7666
7667impl std::convert::From<i32> for AdTracking {
7668 fn from(value: i32) -> Self {
7669 match value {
7670 0 => Self::Unspecified,
7671 1 => Self::Client,
7672 2 => Self::Server,
7673 _ => Self::UnknownValue(ad_tracking::UnknownValue(
7674 wkt::internal::UnknownEnumValue::Integer(value),
7675 )),
7676 }
7677 }
7678}
7679
7680impl std::convert::From<&str> for AdTracking {
7681 fn from(value: &str) -> Self {
7682 use std::string::ToString;
7683 match value {
7684 "AD_TRACKING_UNSPECIFIED" => Self::Unspecified,
7685 "CLIENT" => Self::Client,
7686 "SERVER" => Self::Server,
7687 _ => Self::UnknownValue(ad_tracking::UnknownValue(
7688 wkt::internal::UnknownEnumValue::String(value.to_string()),
7689 )),
7690 }
7691 }
7692}
7693
7694impl serde::ser::Serialize for AdTracking {
7695 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7696 where
7697 S: serde::Serializer,
7698 {
7699 match self {
7700 Self::Unspecified => serializer.serialize_i32(0),
7701 Self::Client => serializer.serialize_i32(1),
7702 Self::Server => serializer.serialize_i32(2),
7703 Self::UnknownValue(u) => u.0.serialize(serializer),
7704 }
7705 }
7706}
7707
7708impl<'de> serde::de::Deserialize<'de> for AdTracking {
7709 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7710 where
7711 D: serde::Deserializer<'de>,
7712 {
7713 deserializer.deserialize_any(wkt::internal::EnumVisitor::<AdTracking>::new(
7714 ".google.cloud.video.stitcher.v1.AdTracking",
7715 ))
7716 }
7717}