1#![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 gax;
23extern crate gaxi;
24extern crate lazy_static;
25extern crate reqwest;
26extern crate rpc;
27extern crate serde;
28extern crate serde_json;
29extern crate serde_with;
30extern crate std;
31extern crate tracing;
32extern crate wkt;
33
34mod debug;
35mod deserialize;
36mod serialize;
37
38#[derive(Clone, Default, PartialEq)]
40#[non_exhaustive]
41pub struct Job {
42 pub name: std::string::String,
45
46 pub input_uri: std::string::String,
53
54 pub output_uri: std::string::String,
60
61 pub state: crate::model::job::ProcessingState,
63
64 pub create_time: std::option::Option<wkt::Timestamp>,
66
67 pub start_time: std::option::Option<wkt::Timestamp>,
69
70 pub end_time: std::option::Option<wkt::Timestamp>,
72
73 pub ttl_after_completion_days: i32,
77
78 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
81
82 pub error: std::option::Option<rpc::model::Status>,
89
90 pub mode: crate::model::job::ProcessingMode,
93
94 pub batch_mode_priority: i32,
99
100 pub optimization: crate::model::job::OptimizationStrategy,
103
104 pub fill_content_gaps: bool,
107
108 pub job_config: std::option::Option<crate::model::job::JobConfig>,
113
114 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
115}
116
117impl Job {
118 pub fn new() -> Self {
119 std::default::Default::default()
120 }
121
122 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
124 self.name = v.into();
125 self
126 }
127
128 pub fn set_input_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
130 self.input_uri = v.into();
131 self
132 }
133
134 pub fn set_output_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
136 self.output_uri = v.into();
137 self
138 }
139
140 pub fn set_state<T: std::convert::Into<crate::model::job::ProcessingState>>(
142 mut self,
143 v: T,
144 ) -> Self {
145 self.state = v.into();
146 self
147 }
148
149 pub fn set_create_time<T>(mut self, v: T) -> Self
151 where
152 T: std::convert::Into<wkt::Timestamp>,
153 {
154 self.create_time = std::option::Option::Some(v.into());
155 self
156 }
157
158 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
160 where
161 T: std::convert::Into<wkt::Timestamp>,
162 {
163 self.create_time = v.map(|x| x.into());
164 self
165 }
166
167 pub fn set_start_time<T>(mut self, v: T) -> Self
169 where
170 T: std::convert::Into<wkt::Timestamp>,
171 {
172 self.start_time = std::option::Option::Some(v.into());
173 self
174 }
175
176 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
178 where
179 T: std::convert::Into<wkt::Timestamp>,
180 {
181 self.start_time = v.map(|x| x.into());
182 self
183 }
184
185 pub fn set_end_time<T>(mut self, v: T) -> Self
187 where
188 T: std::convert::Into<wkt::Timestamp>,
189 {
190 self.end_time = std::option::Option::Some(v.into());
191 self
192 }
193
194 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
196 where
197 T: std::convert::Into<wkt::Timestamp>,
198 {
199 self.end_time = v.map(|x| x.into());
200 self
201 }
202
203 pub fn set_ttl_after_completion_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
205 self.ttl_after_completion_days = v.into();
206 self
207 }
208
209 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
211 where
212 T: std::iter::IntoIterator<Item = (K, V)>,
213 K: std::convert::Into<std::string::String>,
214 V: std::convert::Into<std::string::String>,
215 {
216 use std::iter::Iterator;
217 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
218 self
219 }
220
221 pub fn set_error<T>(mut self, v: T) -> Self
223 where
224 T: std::convert::Into<rpc::model::Status>,
225 {
226 self.error = std::option::Option::Some(v.into());
227 self
228 }
229
230 pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
232 where
233 T: std::convert::Into<rpc::model::Status>,
234 {
235 self.error = v.map(|x| x.into());
236 self
237 }
238
239 pub fn set_mode<T: std::convert::Into<crate::model::job::ProcessingMode>>(
241 mut self,
242 v: T,
243 ) -> Self {
244 self.mode = v.into();
245 self
246 }
247
248 pub fn set_batch_mode_priority<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
250 self.batch_mode_priority = v.into();
251 self
252 }
253
254 pub fn set_optimization<T: std::convert::Into<crate::model::job::OptimizationStrategy>>(
256 mut self,
257 v: T,
258 ) -> Self {
259 self.optimization = v.into();
260 self
261 }
262
263 pub fn set_fill_content_gaps<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
265 self.fill_content_gaps = v.into();
266 self
267 }
268
269 pub fn set_job_config<
274 T: std::convert::Into<std::option::Option<crate::model::job::JobConfig>>,
275 >(
276 mut self,
277 v: T,
278 ) -> Self {
279 self.job_config = v.into();
280 self
281 }
282
283 pub fn template_id(&self) -> std::option::Option<&std::string::String> {
287 #[allow(unreachable_patterns)]
288 self.job_config.as_ref().and_then(|v| match v {
289 crate::model::job::JobConfig::TemplateId(v) => std::option::Option::Some(v),
290 _ => std::option::Option::None,
291 })
292 }
293
294 pub fn set_template_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
300 self.job_config =
301 std::option::Option::Some(crate::model::job::JobConfig::TemplateId(v.into()));
302 self
303 }
304
305 pub fn config(&self) -> std::option::Option<&std::boxed::Box<crate::model::JobConfig>> {
309 #[allow(unreachable_patterns)]
310 self.job_config.as_ref().and_then(|v| match v {
311 crate::model::job::JobConfig::Config(v) => std::option::Option::Some(v),
312 _ => std::option::Option::None,
313 })
314 }
315
316 pub fn set_config<T: std::convert::Into<std::boxed::Box<crate::model::JobConfig>>>(
322 mut self,
323 v: T,
324 ) -> Self {
325 self.job_config = std::option::Option::Some(crate::model::job::JobConfig::Config(v.into()));
326 self
327 }
328}
329
330impl wkt::message::Message for Job {
331 fn typename() -> &'static str {
332 "type.googleapis.com/google.cloud.video.transcoder.v1.Job"
333 }
334}
335
336pub mod job {
338 #[allow(unused_imports)]
339 use super::*;
340
341 #[derive(Clone, Debug, PartialEq)]
357 #[non_exhaustive]
358 pub enum ProcessingState {
359 Unspecified,
361 Pending,
363 Running,
365 Succeeded,
367 Failed,
370 UnknownValue(processing_state::UnknownValue),
375 }
376
377 #[doc(hidden)]
378 pub mod processing_state {
379 #[allow(unused_imports)]
380 use super::*;
381 #[derive(Clone, Debug, PartialEq)]
382 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
383 }
384
385 impl ProcessingState {
386 pub fn value(&self) -> std::option::Option<i32> {
391 match self {
392 Self::Unspecified => std::option::Option::Some(0),
393 Self::Pending => std::option::Option::Some(1),
394 Self::Running => std::option::Option::Some(2),
395 Self::Succeeded => std::option::Option::Some(3),
396 Self::Failed => std::option::Option::Some(4),
397 Self::UnknownValue(u) => u.0.value(),
398 }
399 }
400
401 pub fn name(&self) -> std::option::Option<&str> {
406 match self {
407 Self::Unspecified => std::option::Option::Some("PROCESSING_STATE_UNSPECIFIED"),
408 Self::Pending => std::option::Option::Some("PENDING"),
409 Self::Running => std::option::Option::Some("RUNNING"),
410 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
411 Self::Failed => std::option::Option::Some("FAILED"),
412 Self::UnknownValue(u) => u.0.name(),
413 }
414 }
415 }
416
417 impl std::default::Default for ProcessingState {
418 fn default() -> Self {
419 use std::convert::From;
420 Self::from(0)
421 }
422 }
423
424 impl std::fmt::Display for ProcessingState {
425 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
426 wkt::internal::display_enum(f, self.name(), self.value())
427 }
428 }
429
430 impl std::convert::From<i32> for ProcessingState {
431 fn from(value: i32) -> Self {
432 match value {
433 0 => Self::Unspecified,
434 1 => Self::Pending,
435 2 => Self::Running,
436 3 => Self::Succeeded,
437 4 => Self::Failed,
438 _ => Self::UnknownValue(processing_state::UnknownValue(
439 wkt::internal::UnknownEnumValue::Integer(value),
440 )),
441 }
442 }
443 }
444
445 impl std::convert::From<&str> for ProcessingState {
446 fn from(value: &str) -> Self {
447 use std::string::ToString;
448 match value {
449 "PROCESSING_STATE_UNSPECIFIED" => Self::Unspecified,
450 "PENDING" => Self::Pending,
451 "RUNNING" => Self::Running,
452 "SUCCEEDED" => Self::Succeeded,
453 "FAILED" => Self::Failed,
454 _ => Self::UnknownValue(processing_state::UnknownValue(
455 wkt::internal::UnknownEnumValue::String(value.to_string()),
456 )),
457 }
458 }
459 }
460
461 impl serde::ser::Serialize for ProcessingState {
462 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
463 where
464 S: serde::Serializer,
465 {
466 match self {
467 Self::Unspecified => serializer.serialize_i32(0),
468 Self::Pending => serializer.serialize_i32(1),
469 Self::Running => serializer.serialize_i32(2),
470 Self::Succeeded => serializer.serialize_i32(3),
471 Self::Failed => serializer.serialize_i32(4),
472 Self::UnknownValue(u) => u.0.serialize(serializer),
473 }
474 }
475 }
476
477 impl<'de> serde::de::Deserialize<'de> for ProcessingState {
478 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
479 where
480 D: serde::Deserializer<'de>,
481 {
482 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ProcessingState>::new(
483 ".google.cloud.video.transcoder.v1.Job.ProcessingState",
484 ))
485 }
486 }
487
488 #[derive(Clone, Debug, PartialEq)]
504 #[non_exhaustive]
505 pub enum ProcessingMode {
506 Unspecified,
508 Interactive,
512 Batch,
515 UnknownValue(processing_mode::UnknownValue),
520 }
521
522 #[doc(hidden)]
523 pub mod processing_mode {
524 #[allow(unused_imports)]
525 use super::*;
526 #[derive(Clone, Debug, PartialEq)]
527 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
528 }
529
530 impl ProcessingMode {
531 pub fn value(&self) -> std::option::Option<i32> {
536 match self {
537 Self::Unspecified => std::option::Option::Some(0),
538 Self::Interactive => std::option::Option::Some(1),
539 Self::Batch => std::option::Option::Some(2),
540 Self::UnknownValue(u) => u.0.value(),
541 }
542 }
543
544 pub fn name(&self) -> std::option::Option<&str> {
549 match self {
550 Self::Unspecified => std::option::Option::Some("PROCESSING_MODE_UNSPECIFIED"),
551 Self::Interactive => std::option::Option::Some("PROCESSING_MODE_INTERACTIVE"),
552 Self::Batch => std::option::Option::Some("PROCESSING_MODE_BATCH"),
553 Self::UnknownValue(u) => u.0.name(),
554 }
555 }
556 }
557
558 impl std::default::Default for ProcessingMode {
559 fn default() -> Self {
560 use std::convert::From;
561 Self::from(0)
562 }
563 }
564
565 impl std::fmt::Display for ProcessingMode {
566 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
567 wkt::internal::display_enum(f, self.name(), self.value())
568 }
569 }
570
571 impl std::convert::From<i32> for ProcessingMode {
572 fn from(value: i32) -> Self {
573 match value {
574 0 => Self::Unspecified,
575 1 => Self::Interactive,
576 2 => Self::Batch,
577 _ => Self::UnknownValue(processing_mode::UnknownValue(
578 wkt::internal::UnknownEnumValue::Integer(value),
579 )),
580 }
581 }
582 }
583
584 impl std::convert::From<&str> for ProcessingMode {
585 fn from(value: &str) -> Self {
586 use std::string::ToString;
587 match value {
588 "PROCESSING_MODE_UNSPECIFIED" => Self::Unspecified,
589 "PROCESSING_MODE_INTERACTIVE" => Self::Interactive,
590 "PROCESSING_MODE_BATCH" => Self::Batch,
591 _ => Self::UnknownValue(processing_mode::UnknownValue(
592 wkt::internal::UnknownEnumValue::String(value.to_string()),
593 )),
594 }
595 }
596 }
597
598 impl serde::ser::Serialize for ProcessingMode {
599 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
600 where
601 S: serde::Serializer,
602 {
603 match self {
604 Self::Unspecified => serializer.serialize_i32(0),
605 Self::Interactive => serializer.serialize_i32(1),
606 Self::Batch => serializer.serialize_i32(2),
607 Self::UnknownValue(u) => u.0.serialize(serializer),
608 }
609 }
610 }
611
612 impl<'de> serde::de::Deserialize<'de> for ProcessingMode {
613 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
614 where
615 D: serde::Deserializer<'de>,
616 {
617 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ProcessingMode>::new(
618 ".google.cloud.video.transcoder.v1.Job.ProcessingMode",
619 ))
620 }
621 }
622
623 #[derive(Clone, Debug, PartialEq)]
639 #[non_exhaustive]
640 pub enum OptimizationStrategy {
641 Unspecified,
643 Autodetect,
645 Disabled,
647 UnknownValue(optimization_strategy::UnknownValue),
652 }
653
654 #[doc(hidden)]
655 pub mod optimization_strategy {
656 #[allow(unused_imports)]
657 use super::*;
658 #[derive(Clone, Debug, PartialEq)]
659 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
660 }
661
662 impl OptimizationStrategy {
663 pub fn value(&self) -> std::option::Option<i32> {
668 match self {
669 Self::Unspecified => std::option::Option::Some(0),
670 Self::Autodetect => std::option::Option::Some(1),
671 Self::Disabled => std::option::Option::Some(2),
672 Self::UnknownValue(u) => u.0.value(),
673 }
674 }
675
676 pub fn name(&self) -> std::option::Option<&str> {
681 match self {
682 Self::Unspecified => std::option::Option::Some("OPTIMIZATION_STRATEGY_UNSPECIFIED"),
683 Self::Autodetect => std::option::Option::Some("AUTODETECT"),
684 Self::Disabled => std::option::Option::Some("DISABLED"),
685 Self::UnknownValue(u) => u.0.name(),
686 }
687 }
688 }
689
690 impl std::default::Default for OptimizationStrategy {
691 fn default() -> Self {
692 use std::convert::From;
693 Self::from(0)
694 }
695 }
696
697 impl std::fmt::Display for OptimizationStrategy {
698 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
699 wkt::internal::display_enum(f, self.name(), self.value())
700 }
701 }
702
703 impl std::convert::From<i32> for OptimizationStrategy {
704 fn from(value: i32) -> Self {
705 match value {
706 0 => Self::Unspecified,
707 1 => Self::Autodetect,
708 2 => Self::Disabled,
709 _ => Self::UnknownValue(optimization_strategy::UnknownValue(
710 wkt::internal::UnknownEnumValue::Integer(value),
711 )),
712 }
713 }
714 }
715
716 impl std::convert::From<&str> for OptimizationStrategy {
717 fn from(value: &str) -> Self {
718 use std::string::ToString;
719 match value {
720 "OPTIMIZATION_STRATEGY_UNSPECIFIED" => Self::Unspecified,
721 "AUTODETECT" => Self::Autodetect,
722 "DISABLED" => Self::Disabled,
723 _ => Self::UnknownValue(optimization_strategy::UnknownValue(
724 wkt::internal::UnknownEnumValue::String(value.to_string()),
725 )),
726 }
727 }
728 }
729
730 impl serde::ser::Serialize for OptimizationStrategy {
731 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
732 where
733 S: serde::Serializer,
734 {
735 match self {
736 Self::Unspecified => serializer.serialize_i32(0),
737 Self::Autodetect => serializer.serialize_i32(1),
738 Self::Disabled => serializer.serialize_i32(2),
739 Self::UnknownValue(u) => u.0.serialize(serializer),
740 }
741 }
742 }
743
744 impl<'de> serde::de::Deserialize<'de> for OptimizationStrategy {
745 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
746 where
747 D: serde::Deserializer<'de>,
748 {
749 deserializer.deserialize_any(wkt::internal::EnumVisitor::<OptimizationStrategy>::new(
750 ".google.cloud.video.transcoder.v1.Job.OptimizationStrategy",
751 ))
752 }
753 }
754
755 #[derive(Clone, Debug, PartialEq)]
760 #[non_exhaustive]
761 pub enum JobConfig {
762 TemplateId(std::string::String),
767 Config(std::boxed::Box<crate::model::JobConfig>),
769 }
770}
771
772#[derive(Clone, Default, PartialEq)]
774#[non_exhaustive]
775pub struct JobTemplate {
776 pub name: std::string::String,
780
781 pub config: std::option::Option<crate::model::JobConfig>,
783
784 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
787
788 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
789}
790
791impl JobTemplate {
792 pub fn new() -> Self {
793 std::default::Default::default()
794 }
795
796 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
798 self.name = v.into();
799 self
800 }
801
802 pub fn set_config<T>(mut self, v: T) -> Self
804 where
805 T: std::convert::Into<crate::model::JobConfig>,
806 {
807 self.config = std::option::Option::Some(v.into());
808 self
809 }
810
811 pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
813 where
814 T: std::convert::Into<crate::model::JobConfig>,
815 {
816 self.config = v.map(|x| x.into());
817 self
818 }
819
820 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
822 where
823 T: std::iter::IntoIterator<Item = (K, V)>,
824 K: std::convert::Into<std::string::String>,
825 V: std::convert::Into<std::string::String>,
826 {
827 use std::iter::Iterator;
828 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
829 self
830 }
831}
832
833impl wkt::message::Message for JobTemplate {
834 fn typename() -> &'static str {
835 "type.googleapis.com/google.cloud.video.transcoder.v1.JobTemplate"
836 }
837}
838
839#[derive(Clone, Default, PartialEq)]
841#[non_exhaustive]
842pub struct JobConfig {
843 pub inputs: std::vec::Vec<crate::model::Input>,
845
846 pub edit_list: std::vec::Vec<crate::model::EditAtom>,
849
850 pub elementary_streams: std::vec::Vec<crate::model::ElementaryStream>,
852
853 pub mux_streams: std::vec::Vec<crate::model::MuxStream>,
855
856 pub manifests: std::vec::Vec<crate::model::Manifest>,
858
859 pub output: std::option::Option<crate::model::Output>,
861
862 pub ad_breaks: std::vec::Vec<crate::model::AdBreak>,
865
866 pub pubsub_destination: std::option::Option<crate::model::PubsubDestination>,
868
869 pub sprite_sheets: std::vec::Vec<crate::model::SpriteSheet>,
872
873 pub overlays: std::vec::Vec<crate::model::Overlay>,
875
876 pub encryptions: std::vec::Vec<crate::model::Encryption>,
883
884 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
885}
886
887impl JobConfig {
888 pub fn new() -> Self {
889 std::default::Default::default()
890 }
891
892 pub fn set_inputs<T, V>(mut self, v: T) -> Self
894 where
895 T: std::iter::IntoIterator<Item = V>,
896 V: std::convert::Into<crate::model::Input>,
897 {
898 use std::iter::Iterator;
899 self.inputs = v.into_iter().map(|i| i.into()).collect();
900 self
901 }
902
903 pub fn set_edit_list<T, V>(mut self, v: T) -> Self
905 where
906 T: std::iter::IntoIterator<Item = V>,
907 V: std::convert::Into<crate::model::EditAtom>,
908 {
909 use std::iter::Iterator;
910 self.edit_list = v.into_iter().map(|i| i.into()).collect();
911 self
912 }
913
914 pub fn set_elementary_streams<T, V>(mut self, v: T) -> Self
916 where
917 T: std::iter::IntoIterator<Item = V>,
918 V: std::convert::Into<crate::model::ElementaryStream>,
919 {
920 use std::iter::Iterator;
921 self.elementary_streams = v.into_iter().map(|i| i.into()).collect();
922 self
923 }
924
925 pub fn set_mux_streams<T, V>(mut self, v: T) -> Self
927 where
928 T: std::iter::IntoIterator<Item = V>,
929 V: std::convert::Into<crate::model::MuxStream>,
930 {
931 use std::iter::Iterator;
932 self.mux_streams = v.into_iter().map(|i| i.into()).collect();
933 self
934 }
935
936 pub fn set_manifests<T, V>(mut self, v: T) -> Self
938 where
939 T: std::iter::IntoIterator<Item = V>,
940 V: std::convert::Into<crate::model::Manifest>,
941 {
942 use std::iter::Iterator;
943 self.manifests = v.into_iter().map(|i| i.into()).collect();
944 self
945 }
946
947 pub fn set_output<T>(mut self, v: T) -> Self
949 where
950 T: std::convert::Into<crate::model::Output>,
951 {
952 self.output = std::option::Option::Some(v.into());
953 self
954 }
955
956 pub fn set_or_clear_output<T>(mut self, v: std::option::Option<T>) -> Self
958 where
959 T: std::convert::Into<crate::model::Output>,
960 {
961 self.output = v.map(|x| x.into());
962 self
963 }
964
965 pub fn set_ad_breaks<T, V>(mut self, v: T) -> Self
967 where
968 T: std::iter::IntoIterator<Item = V>,
969 V: std::convert::Into<crate::model::AdBreak>,
970 {
971 use std::iter::Iterator;
972 self.ad_breaks = v.into_iter().map(|i| i.into()).collect();
973 self
974 }
975
976 pub fn set_pubsub_destination<T>(mut self, v: T) -> Self
978 where
979 T: std::convert::Into<crate::model::PubsubDestination>,
980 {
981 self.pubsub_destination = std::option::Option::Some(v.into());
982 self
983 }
984
985 pub fn set_or_clear_pubsub_destination<T>(mut self, v: std::option::Option<T>) -> Self
987 where
988 T: std::convert::Into<crate::model::PubsubDestination>,
989 {
990 self.pubsub_destination = v.map(|x| x.into());
991 self
992 }
993
994 pub fn set_sprite_sheets<T, V>(mut self, v: T) -> Self
996 where
997 T: std::iter::IntoIterator<Item = V>,
998 V: std::convert::Into<crate::model::SpriteSheet>,
999 {
1000 use std::iter::Iterator;
1001 self.sprite_sheets = v.into_iter().map(|i| i.into()).collect();
1002 self
1003 }
1004
1005 pub fn set_overlays<T, V>(mut self, v: T) -> Self
1007 where
1008 T: std::iter::IntoIterator<Item = V>,
1009 V: std::convert::Into<crate::model::Overlay>,
1010 {
1011 use std::iter::Iterator;
1012 self.overlays = v.into_iter().map(|i| i.into()).collect();
1013 self
1014 }
1015
1016 pub fn set_encryptions<T, V>(mut self, v: T) -> Self
1018 where
1019 T: std::iter::IntoIterator<Item = V>,
1020 V: std::convert::Into<crate::model::Encryption>,
1021 {
1022 use std::iter::Iterator;
1023 self.encryptions = v.into_iter().map(|i| i.into()).collect();
1024 self
1025 }
1026}
1027
1028impl wkt::message::Message for JobConfig {
1029 fn typename() -> &'static str {
1030 "type.googleapis.com/google.cloud.video.transcoder.v1.JobConfig"
1031 }
1032}
1033
1034#[derive(Clone, Default, PartialEq)]
1036#[non_exhaustive]
1037pub struct Input {
1038 pub key: std::string::String,
1041
1042 pub uri: std::string::String,
1051
1052 pub preprocessing_config: std::option::Option<crate::model::PreprocessingConfig>,
1054
1055 pub attributes: std::option::Option<crate::model::InputAttributes>,
1057
1058 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1059}
1060
1061impl Input {
1062 pub fn new() -> Self {
1063 std::default::Default::default()
1064 }
1065
1066 pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1068 self.key = v.into();
1069 self
1070 }
1071
1072 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1074 self.uri = v.into();
1075 self
1076 }
1077
1078 pub fn set_preprocessing_config<T>(mut self, v: T) -> Self
1080 where
1081 T: std::convert::Into<crate::model::PreprocessingConfig>,
1082 {
1083 self.preprocessing_config = std::option::Option::Some(v.into());
1084 self
1085 }
1086
1087 pub fn set_or_clear_preprocessing_config<T>(mut self, v: std::option::Option<T>) -> Self
1089 where
1090 T: std::convert::Into<crate::model::PreprocessingConfig>,
1091 {
1092 self.preprocessing_config = v.map(|x| x.into());
1093 self
1094 }
1095
1096 pub fn set_attributes<T>(mut self, v: T) -> Self
1098 where
1099 T: std::convert::Into<crate::model::InputAttributes>,
1100 {
1101 self.attributes = std::option::Option::Some(v.into());
1102 self
1103 }
1104
1105 pub fn set_or_clear_attributes<T>(mut self, v: std::option::Option<T>) -> Self
1107 where
1108 T: std::convert::Into<crate::model::InputAttributes>,
1109 {
1110 self.attributes = v.map(|x| x.into());
1111 self
1112 }
1113}
1114
1115impl wkt::message::Message for Input {
1116 fn typename() -> &'static str {
1117 "type.googleapis.com/google.cloud.video.transcoder.v1.Input"
1118 }
1119}
1120
1121#[derive(Clone, Default, PartialEq)]
1123#[non_exhaustive]
1124pub struct Output {
1125 pub uri: std::string::String,
1133
1134 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1135}
1136
1137impl Output {
1138 pub fn new() -> Self {
1139 std::default::Default::default()
1140 }
1141
1142 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1144 self.uri = v.into();
1145 self
1146 }
1147}
1148
1149impl wkt::message::Message for Output {
1150 fn typename() -> &'static str {
1151 "type.googleapis.com/google.cloud.video.transcoder.v1.Output"
1152 }
1153}
1154
1155#[derive(Clone, Default, PartialEq)]
1157#[non_exhaustive]
1158pub struct EditAtom {
1159 pub key: std::string::String,
1162
1163 pub inputs: std::vec::Vec<std::string::String>,
1169
1170 pub end_time_offset: std::option::Option<wkt::Duration>,
1174
1175 pub start_time_offset: std::option::Option<wkt::Duration>,
1178
1179 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1180}
1181
1182impl EditAtom {
1183 pub fn new() -> Self {
1184 std::default::Default::default()
1185 }
1186
1187 pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1189 self.key = v.into();
1190 self
1191 }
1192
1193 pub fn set_inputs<T, V>(mut self, v: T) -> Self
1195 where
1196 T: std::iter::IntoIterator<Item = V>,
1197 V: std::convert::Into<std::string::String>,
1198 {
1199 use std::iter::Iterator;
1200 self.inputs = v.into_iter().map(|i| i.into()).collect();
1201 self
1202 }
1203
1204 pub fn set_end_time_offset<T>(mut self, v: T) -> Self
1206 where
1207 T: std::convert::Into<wkt::Duration>,
1208 {
1209 self.end_time_offset = std::option::Option::Some(v.into());
1210 self
1211 }
1212
1213 pub fn set_or_clear_end_time_offset<T>(mut self, v: std::option::Option<T>) -> Self
1215 where
1216 T: std::convert::Into<wkt::Duration>,
1217 {
1218 self.end_time_offset = v.map(|x| x.into());
1219 self
1220 }
1221
1222 pub fn set_start_time_offset<T>(mut self, v: T) -> Self
1224 where
1225 T: std::convert::Into<wkt::Duration>,
1226 {
1227 self.start_time_offset = std::option::Option::Some(v.into());
1228 self
1229 }
1230
1231 pub fn set_or_clear_start_time_offset<T>(mut self, v: std::option::Option<T>) -> Self
1233 where
1234 T: std::convert::Into<wkt::Duration>,
1235 {
1236 self.start_time_offset = v.map(|x| x.into());
1237 self
1238 }
1239}
1240
1241impl wkt::message::Message for EditAtom {
1242 fn typename() -> &'static str {
1243 "type.googleapis.com/google.cloud.video.transcoder.v1.EditAtom"
1244 }
1245}
1246
1247#[derive(Clone, Default, PartialEq)]
1249#[non_exhaustive]
1250pub struct AdBreak {
1251 pub start_time_offset: std::option::Option<wkt::Duration>,
1254
1255 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1256}
1257
1258impl AdBreak {
1259 pub fn new() -> Self {
1260 std::default::Default::default()
1261 }
1262
1263 pub fn set_start_time_offset<T>(mut self, v: T) -> Self
1265 where
1266 T: std::convert::Into<wkt::Duration>,
1267 {
1268 self.start_time_offset = std::option::Option::Some(v.into());
1269 self
1270 }
1271
1272 pub fn set_or_clear_start_time_offset<T>(mut self, v: std::option::Option<T>) -> Self
1274 where
1275 T: std::convert::Into<wkt::Duration>,
1276 {
1277 self.start_time_offset = v.map(|x| x.into());
1278 self
1279 }
1280}
1281
1282impl wkt::message::Message for AdBreak {
1283 fn typename() -> &'static str {
1284 "type.googleapis.com/google.cloud.video.transcoder.v1.AdBreak"
1285 }
1286}
1287
1288#[derive(Clone, Default, PartialEq)]
1292#[non_exhaustive]
1293pub struct ElementaryStream {
1294 pub key: std::string::String,
1296
1297 pub elementary_stream: std::option::Option<crate::model::elementary_stream::ElementaryStream>,
1299
1300 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1301}
1302
1303impl ElementaryStream {
1304 pub fn new() -> Self {
1305 std::default::Default::default()
1306 }
1307
1308 pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1310 self.key = v.into();
1311 self
1312 }
1313
1314 pub fn set_elementary_stream<
1319 T: std::convert::Into<std::option::Option<crate::model::elementary_stream::ElementaryStream>>,
1320 >(
1321 mut self,
1322 v: T,
1323 ) -> Self {
1324 self.elementary_stream = v.into();
1325 self
1326 }
1327
1328 pub fn video_stream(&self) -> std::option::Option<&std::boxed::Box<crate::model::VideoStream>> {
1332 #[allow(unreachable_patterns)]
1333 self.elementary_stream.as_ref().and_then(|v| match v {
1334 crate::model::elementary_stream::ElementaryStream::VideoStream(v) => {
1335 std::option::Option::Some(v)
1336 }
1337 _ => std::option::Option::None,
1338 })
1339 }
1340
1341 pub fn set_video_stream<T: std::convert::Into<std::boxed::Box<crate::model::VideoStream>>>(
1347 mut self,
1348 v: T,
1349 ) -> Self {
1350 self.elementary_stream = std::option::Option::Some(
1351 crate::model::elementary_stream::ElementaryStream::VideoStream(v.into()),
1352 );
1353 self
1354 }
1355
1356 pub fn audio_stream(&self) -> std::option::Option<&std::boxed::Box<crate::model::AudioStream>> {
1360 #[allow(unreachable_patterns)]
1361 self.elementary_stream.as_ref().and_then(|v| match v {
1362 crate::model::elementary_stream::ElementaryStream::AudioStream(v) => {
1363 std::option::Option::Some(v)
1364 }
1365 _ => std::option::Option::None,
1366 })
1367 }
1368
1369 pub fn set_audio_stream<T: std::convert::Into<std::boxed::Box<crate::model::AudioStream>>>(
1375 mut self,
1376 v: T,
1377 ) -> Self {
1378 self.elementary_stream = std::option::Option::Some(
1379 crate::model::elementary_stream::ElementaryStream::AudioStream(v.into()),
1380 );
1381 self
1382 }
1383
1384 pub fn text_stream(&self) -> std::option::Option<&std::boxed::Box<crate::model::TextStream>> {
1388 #[allow(unreachable_patterns)]
1389 self.elementary_stream.as_ref().and_then(|v| match v {
1390 crate::model::elementary_stream::ElementaryStream::TextStream(v) => {
1391 std::option::Option::Some(v)
1392 }
1393 _ => std::option::Option::None,
1394 })
1395 }
1396
1397 pub fn set_text_stream<T: std::convert::Into<std::boxed::Box<crate::model::TextStream>>>(
1403 mut self,
1404 v: T,
1405 ) -> Self {
1406 self.elementary_stream = std::option::Option::Some(
1407 crate::model::elementary_stream::ElementaryStream::TextStream(v.into()),
1408 );
1409 self
1410 }
1411}
1412
1413impl wkt::message::Message for ElementaryStream {
1414 fn typename() -> &'static str {
1415 "type.googleapis.com/google.cloud.video.transcoder.v1.ElementaryStream"
1416 }
1417}
1418
1419pub mod elementary_stream {
1421 #[allow(unused_imports)]
1422 use super::*;
1423
1424 #[derive(Clone, Debug, PartialEq)]
1426 #[non_exhaustive]
1427 pub enum ElementaryStream {
1428 VideoStream(std::boxed::Box<crate::model::VideoStream>),
1430 AudioStream(std::boxed::Box<crate::model::AudioStream>),
1432 TextStream(std::boxed::Box<crate::model::TextStream>),
1434 }
1435}
1436
1437#[derive(Clone, Default, PartialEq)]
1439#[non_exhaustive]
1440pub struct MuxStream {
1441 pub key: std::string::String,
1443
1444 pub file_name: std::string::String,
1455
1456 pub container: std::string::String,
1474
1475 pub elementary_streams: std::vec::Vec<std::string::String>,
1481
1482 pub segment_settings: std::option::Option<crate::model::SegmentSettings>,
1484
1485 pub encryption_id: std::string::String,
1488
1489 pub container_config: std::option::Option<crate::model::mux_stream::ContainerConfig>,
1491
1492 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1493}
1494
1495impl MuxStream {
1496 pub fn new() -> Self {
1497 std::default::Default::default()
1498 }
1499
1500 pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1502 self.key = v.into();
1503 self
1504 }
1505
1506 pub fn set_file_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1508 self.file_name = v.into();
1509 self
1510 }
1511
1512 pub fn set_container<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1514 self.container = v.into();
1515 self
1516 }
1517
1518 pub fn set_elementary_streams<T, V>(mut self, v: T) -> Self
1520 where
1521 T: std::iter::IntoIterator<Item = V>,
1522 V: std::convert::Into<std::string::String>,
1523 {
1524 use std::iter::Iterator;
1525 self.elementary_streams = v.into_iter().map(|i| i.into()).collect();
1526 self
1527 }
1528
1529 pub fn set_segment_settings<T>(mut self, v: T) -> Self
1531 where
1532 T: std::convert::Into<crate::model::SegmentSettings>,
1533 {
1534 self.segment_settings = std::option::Option::Some(v.into());
1535 self
1536 }
1537
1538 pub fn set_or_clear_segment_settings<T>(mut self, v: std::option::Option<T>) -> Self
1540 where
1541 T: std::convert::Into<crate::model::SegmentSettings>,
1542 {
1543 self.segment_settings = v.map(|x| x.into());
1544 self
1545 }
1546
1547 pub fn set_encryption_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1549 self.encryption_id = v.into();
1550 self
1551 }
1552
1553 pub fn set_container_config<
1558 T: std::convert::Into<std::option::Option<crate::model::mux_stream::ContainerConfig>>,
1559 >(
1560 mut self,
1561 v: T,
1562 ) -> Self {
1563 self.container_config = v.into();
1564 self
1565 }
1566
1567 pub fn fmp4(
1571 &self,
1572 ) -> std::option::Option<&std::boxed::Box<crate::model::mux_stream::Fmp4Config>> {
1573 #[allow(unreachable_patterns)]
1574 self.container_config.as_ref().and_then(|v| match v {
1575 crate::model::mux_stream::ContainerConfig::Fmp4(v) => std::option::Option::Some(v),
1576 _ => std::option::Option::None,
1577 })
1578 }
1579
1580 pub fn set_fmp4<
1586 T: std::convert::Into<std::boxed::Box<crate::model::mux_stream::Fmp4Config>>,
1587 >(
1588 mut self,
1589 v: T,
1590 ) -> Self {
1591 self.container_config =
1592 std::option::Option::Some(crate::model::mux_stream::ContainerConfig::Fmp4(v.into()));
1593 self
1594 }
1595}
1596
1597impl wkt::message::Message for MuxStream {
1598 fn typename() -> &'static str {
1599 "type.googleapis.com/google.cloud.video.transcoder.v1.MuxStream"
1600 }
1601}
1602
1603pub mod mux_stream {
1605 #[allow(unused_imports)]
1606 use super::*;
1607
1608 #[derive(Clone, Default, PartialEq)]
1610 #[non_exhaustive]
1611 pub struct Fmp4Config {
1612 pub codec_tag: std::string::String,
1620
1621 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1622 }
1623
1624 impl Fmp4Config {
1625 pub fn new() -> Self {
1626 std::default::Default::default()
1627 }
1628
1629 pub fn set_codec_tag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1631 self.codec_tag = v.into();
1632 self
1633 }
1634 }
1635
1636 impl wkt::message::Message for Fmp4Config {
1637 fn typename() -> &'static str {
1638 "type.googleapis.com/google.cloud.video.transcoder.v1.MuxStream.Fmp4Config"
1639 }
1640 }
1641
1642 #[derive(Clone, Debug, PartialEq)]
1644 #[non_exhaustive]
1645 pub enum ContainerConfig {
1646 Fmp4(std::boxed::Box<crate::model::mux_stream::Fmp4Config>),
1648 }
1649}
1650
1651#[derive(Clone, Default, PartialEq)]
1653#[non_exhaustive]
1654pub struct Manifest {
1655 pub file_name: std::string::String,
1661
1662 pub r#type: crate::model::manifest::ManifestType,
1664
1665 pub mux_streams: std::vec::Vec<std::string::String>,
1677
1678 pub manifest_config: std::option::Option<crate::model::manifest::ManifestConfig>,
1680
1681 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1682}
1683
1684impl Manifest {
1685 pub fn new() -> Self {
1686 std::default::Default::default()
1687 }
1688
1689 pub fn set_file_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1691 self.file_name = v.into();
1692 self
1693 }
1694
1695 pub fn set_type<T: std::convert::Into<crate::model::manifest::ManifestType>>(
1697 mut self,
1698 v: T,
1699 ) -> Self {
1700 self.r#type = v.into();
1701 self
1702 }
1703
1704 pub fn set_mux_streams<T, V>(mut self, v: T) -> Self
1706 where
1707 T: std::iter::IntoIterator<Item = V>,
1708 V: std::convert::Into<std::string::String>,
1709 {
1710 use std::iter::Iterator;
1711 self.mux_streams = v.into_iter().map(|i| i.into()).collect();
1712 self
1713 }
1714
1715 pub fn set_manifest_config<
1720 T: std::convert::Into<std::option::Option<crate::model::manifest::ManifestConfig>>,
1721 >(
1722 mut self,
1723 v: T,
1724 ) -> Self {
1725 self.manifest_config = v.into();
1726 self
1727 }
1728
1729 pub fn dash(
1733 &self,
1734 ) -> std::option::Option<&std::boxed::Box<crate::model::manifest::DashConfig>> {
1735 #[allow(unreachable_patterns)]
1736 self.manifest_config.as_ref().and_then(|v| match v {
1737 crate::model::manifest::ManifestConfig::Dash(v) => std::option::Option::Some(v),
1738 _ => std::option::Option::None,
1739 })
1740 }
1741
1742 pub fn set_dash<T: std::convert::Into<std::boxed::Box<crate::model::manifest::DashConfig>>>(
1748 mut self,
1749 v: T,
1750 ) -> Self {
1751 self.manifest_config =
1752 std::option::Option::Some(crate::model::manifest::ManifestConfig::Dash(v.into()));
1753 self
1754 }
1755}
1756
1757impl wkt::message::Message for Manifest {
1758 fn typename() -> &'static str {
1759 "type.googleapis.com/google.cloud.video.transcoder.v1.Manifest"
1760 }
1761}
1762
1763pub mod manifest {
1765 #[allow(unused_imports)]
1766 use super::*;
1767
1768 #[derive(Clone, Default, PartialEq)]
1770 #[non_exhaustive]
1771 pub struct DashConfig {
1772 pub segment_reference_scheme: crate::model::manifest::dash_config::SegmentReferenceScheme,
1775
1776 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1777 }
1778
1779 impl DashConfig {
1780 pub fn new() -> Self {
1781 std::default::Default::default()
1782 }
1783
1784 pub fn set_segment_reference_scheme<
1786 T: std::convert::Into<crate::model::manifest::dash_config::SegmentReferenceScheme>,
1787 >(
1788 mut self,
1789 v: T,
1790 ) -> Self {
1791 self.segment_reference_scheme = v.into();
1792 self
1793 }
1794 }
1795
1796 impl wkt::message::Message for DashConfig {
1797 fn typename() -> &'static str {
1798 "type.googleapis.com/google.cloud.video.transcoder.v1.Manifest.DashConfig"
1799 }
1800 }
1801
1802 pub mod dash_config {
1804 #[allow(unused_imports)]
1805 use super::*;
1806
1807 #[derive(Clone, Debug, PartialEq)]
1823 #[non_exhaustive]
1824 pub enum SegmentReferenceScheme {
1825 Unspecified,
1827 SegmentList,
1843 SegmentTemplateNumber,
1858 UnknownValue(segment_reference_scheme::UnknownValue),
1863 }
1864
1865 #[doc(hidden)]
1866 pub mod segment_reference_scheme {
1867 #[allow(unused_imports)]
1868 use super::*;
1869 #[derive(Clone, Debug, PartialEq)]
1870 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1871 }
1872
1873 impl SegmentReferenceScheme {
1874 pub fn value(&self) -> std::option::Option<i32> {
1879 match self {
1880 Self::Unspecified => std::option::Option::Some(0),
1881 Self::SegmentList => std::option::Option::Some(1),
1882 Self::SegmentTemplateNumber => std::option::Option::Some(2),
1883 Self::UnknownValue(u) => u.0.value(),
1884 }
1885 }
1886
1887 pub fn name(&self) -> std::option::Option<&str> {
1892 match self {
1893 Self::Unspecified => {
1894 std::option::Option::Some("SEGMENT_REFERENCE_SCHEME_UNSPECIFIED")
1895 }
1896 Self::SegmentList => std::option::Option::Some("SEGMENT_LIST"),
1897 Self::SegmentTemplateNumber => {
1898 std::option::Option::Some("SEGMENT_TEMPLATE_NUMBER")
1899 }
1900 Self::UnknownValue(u) => u.0.name(),
1901 }
1902 }
1903 }
1904
1905 impl std::default::Default for SegmentReferenceScheme {
1906 fn default() -> Self {
1907 use std::convert::From;
1908 Self::from(0)
1909 }
1910 }
1911
1912 impl std::fmt::Display for SegmentReferenceScheme {
1913 fn fmt(
1914 &self,
1915 f: &mut std::fmt::Formatter<'_>,
1916 ) -> std::result::Result<(), std::fmt::Error> {
1917 wkt::internal::display_enum(f, self.name(), self.value())
1918 }
1919 }
1920
1921 impl std::convert::From<i32> for SegmentReferenceScheme {
1922 fn from(value: i32) -> Self {
1923 match value {
1924 0 => Self::Unspecified,
1925 1 => Self::SegmentList,
1926 2 => Self::SegmentTemplateNumber,
1927 _ => Self::UnknownValue(segment_reference_scheme::UnknownValue(
1928 wkt::internal::UnknownEnumValue::Integer(value),
1929 )),
1930 }
1931 }
1932 }
1933
1934 impl std::convert::From<&str> for SegmentReferenceScheme {
1935 fn from(value: &str) -> Self {
1936 use std::string::ToString;
1937 match value {
1938 "SEGMENT_REFERENCE_SCHEME_UNSPECIFIED" => Self::Unspecified,
1939 "SEGMENT_LIST" => Self::SegmentList,
1940 "SEGMENT_TEMPLATE_NUMBER" => Self::SegmentTemplateNumber,
1941 _ => Self::UnknownValue(segment_reference_scheme::UnknownValue(
1942 wkt::internal::UnknownEnumValue::String(value.to_string()),
1943 )),
1944 }
1945 }
1946 }
1947
1948 impl serde::ser::Serialize for SegmentReferenceScheme {
1949 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1950 where
1951 S: serde::Serializer,
1952 {
1953 match self {
1954 Self::Unspecified => serializer.serialize_i32(0),
1955 Self::SegmentList => serializer.serialize_i32(1),
1956 Self::SegmentTemplateNumber => serializer.serialize_i32(2),
1957 Self::UnknownValue(u) => u.0.serialize(serializer),
1958 }
1959 }
1960 }
1961
1962 impl<'de> serde::de::Deserialize<'de> for SegmentReferenceScheme {
1963 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1964 where
1965 D: serde::Deserializer<'de>,
1966 {
1967 deserializer.deserialize_any(wkt::internal::EnumVisitor::<SegmentReferenceScheme>::new(
1968 ".google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme"))
1969 }
1970 }
1971 }
1972
1973 #[derive(Clone, Debug, PartialEq)]
1989 #[non_exhaustive]
1990 pub enum ManifestType {
1991 Unspecified,
1993 Hls,
1995 Dash,
1997 UnknownValue(manifest_type::UnknownValue),
2002 }
2003
2004 #[doc(hidden)]
2005 pub mod manifest_type {
2006 #[allow(unused_imports)]
2007 use super::*;
2008 #[derive(Clone, Debug, PartialEq)]
2009 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2010 }
2011
2012 impl ManifestType {
2013 pub fn value(&self) -> std::option::Option<i32> {
2018 match self {
2019 Self::Unspecified => std::option::Option::Some(0),
2020 Self::Hls => std::option::Option::Some(1),
2021 Self::Dash => std::option::Option::Some(2),
2022 Self::UnknownValue(u) => u.0.value(),
2023 }
2024 }
2025
2026 pub fn name(&self) -> std::option::Option<&str> {
2031 match self {
2032 Self::Unspecified => std::option::Option::Some("MANIFEST_TYPE_UNSPECIFIED"),
2033 Self::Hls => std::option::Option::Some("HLS"),
2034 Self::Dash => std::option::Option::Some("DASH"),
2035 Self::UnknownValue(u) => u.0.name(),
2036 }
2037 }
2038 }
2039
2040 impl std::default::Default for ManifestType {
2041 fn default() -> Self {
2042 use std::convert::From;
2043 Self::from(0)
2044 }
2045 }
2046
2047 impl std::fmt::Display for ManifestType {
2048 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2049 wkt::internal::display_enum(f, self.name(), self.value())
2050 }
2051 }
2052
2053 impl std::convert::From<i32> for ManifestType {
2054 fn from(value: i32) -> Self {
2055 match value {
2056 0 => Self::Unspecified,
2057 1 => Self::Hls,
2058 2 => Self::Dash,
2059 _ => Self::UnknownValue(manifest_type::UnknownValue(
2060 wkt::internal::UnknownEnumValue::Integer(value),
2061 )),
2062 }
2063 }
2064 }
2065
2066 impl std::convert::From<&str> for ManifestType {
2067 fn from(value: &str) -> Self {
2068 use std::string::ToString;
2069 match value {
2070 "MANIFEST_TYPE_UNSPECIFIED" => Self::Unspecified,
2071 "HLS" => Self::Hls,
2072 "DASH" => Self::Dash,
2073 _ => Self::UnknownValue(manifest_type::UnknownValue(
2074 wkt::internal::UnknownEnumValue::String(value.to_string()),
2075 )),
2076 }
2077 }
2078 }
2079
2080 impl serde::ser::Serialize for ManifestType {
2081 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2082 where
2083 S: serde::Serializer,
2084 {
2085 match self {
2086 Self::Unspecified => serializer.serialize_i32(0),
2087 Self::Hls => serializer.serialize_i32(1),
2088 Self::Dash => serializer.serialize_i32(2),
2089 Self::UnknownValue(u) => u.0.serialize(serializer),
2090 }
2091 }
2092 }
2093
2094 impl<'de> serde::de::Deserialize<'de> for ManifestType {
2095 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2096 where
2097 D: serde::Deserializer<'de>,
2098 {
2099 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ManifestType>::new(
2100 ".google.cloud.video.transcoder.v1.Manifest.ManifestType",
2101 ))
2102 }
2103 }
2104
2105 #[derive(Clone, Debug, PartialEq)]
2107 #[non_exhaustive]
2108 pub enum ManifestConfig {
2109 Dash(std::boxed::Box<crate::model::manifest::DashConfig>),
2111 }
2112}
2113
2114#[derive(Clone, Default, PartialEq)]
2116#[non_exhaustive]
2117pub struct PubsubDestination {
2118 pub topic: std::string::String,
2121
2122 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2123}
2124
2125impl PubsubDestination {
2126 pub fn new() -> Self {
2127 std::default::Default::default()
2128 }
2129
2130 pub fn set_topic<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2132 self.topic = v.into();
2133 self
2134 }
2135}
2136
2137impl wkt::message::Message for PubsubDestination {
2138 fn typename() -> &'static str {
2139 "type.googleapis.com/google.cloud.video.transcoder.v1.PubsubDestination"
2140 }
2141}
2142
2143#[derive(Clone, Default, PartialEq)]
2145#[non_exhaustive]
2146pub struct SpriteSheet {
2147 pub format: std::string::String,
2153
2154 pub file_prefix: std::string::String,
2159
2160 pub sprite_width_pixels: i32,
2176
2177 pub sprite_height_pixels: i32,
2193
2194 pub column_count: i32,
2197
2198 pub row_count: i32,
2202
2203 pub start_time_offset: std::option::Option<wkt::Duration>,
2206
2207 pub end_time_offset: std::option::Option<wkt::Duration>,
2211
2212 pub quality: i32,
2217
2218 pub extraction_strategy: std::option::Option<crate::model::sprite_sheet::ExtractionStrategy>,
2220
2221 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2222}
2223
2224impl SpriteSheet {
2225 pub fn new() -> Self {
2226 std::default::Default::default()
2227 }
2228
2229 pub fn set_format<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2231 self.format = v.into();
2232 self
2233 }
2234
2235 pub fn set_file_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2237 self.file_prefix = v.into();
2238 self
2239 }
2240
2241 pub fn set_sprite_width_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2243 self.sprite_width_pixels = v.into();
2244 self
2245 }
2246
2247 pub fn set_sprite_height_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2249 self.sprite_height_pixels = v.into();
2250 self
2251 }
2252
2253 pub fn set_column_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2255 self.column_count = v.into();
2256 self
2257 }
2258
2259 pub fn set_row_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2261 self.row_count = v.into();
2262 self
2263 }
2264
2265 pub fn set_start_time_offset<T>(mut self, v: T) -> Self
2267 where
2268 T: std::convert::Into<wkt::Duration>,
2269 {
2270 self.start_time_offset = std::option::Option::Some(v.into());
2271 self
2272 }
2273
2274 pub fn set_or_clear_start_time_offset<T>(mut self, v: std::option::Option<T>) -> Self
2276 where
2277 T: std::convert::Into<wkt::Duration>,
2278 {
2279 self.start_time_offset = v.map(|x| x.into());
2280 self
2281 }
2282
2283 pub fn set_end_time_offset<T>(mut self, v: T) -> Self
2285 where
2286 T: std::convert::Into<wkt::Duration>,
2287 {
2288 self.end_time_offset = std::option::Option::Some(v.into());
2289 self
2290 }
2291
2292 pub fn set_or_clear_end_time_offset<T>(mut self, v: std::option::Option<T>) -> Self
2294 where
2295 T: std::convert::Into<wkt::Duration>,
2296 {
2297 self.end_time_offset = v.map(|x| x.into());
2298 self
2299 }
2300
2301 pub fn set_quality<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2303 self.quality = v.into();
2304 self
2305 }
2306
2307 pub fn set_extraction_strategy<
2312 T: std::convert::Into<std::option::Option<crate::model::sprite_sheet::ExtractionStrategy>>,
2313 >(
2314 mut self,
2315 v: T,
2316 ) -> Self {
2317 self.extraction_strategy = v.into();
2318 self
2319 }
2320
2321 pub fn total_count(&self) -> std::option::Option<&i32> {
2325 #[allow(unreachable_patterns)]
2326 self.extraction_strategy.as_ref().and_then(|v| match v {
2327 crate::model::sprite_sheet::ExtractionStrategy::TotalCount(v) => {
2328 std::option::Option::Some(v)
2329 }
2330 _ => std::option::Option::None,
2331 })
2332 }
2333
2334 pub fn set_total_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2340 self.extraction_strategy = std::option::Option::Some(
2341 crate::model::sprite_sheet::ExtractionStrategy::TotalCount(v.into()),
2342 );
2343 self
2344 }
2345
2346 pub fn interval(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
2350 #[allow(unreachable_patterns)]
2351 self.extraction_strategy.as_ref().and_then(|v| match v {
2352 crate::model::sprite_sheet::ExtractionStrategy::Interval(v) => {
2353 std::option::Option::Some(v)
2354 }
2355 _ => std::option::Option::None,
2356 })
2357 }
2358
2359 pub fn set_interval<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
2365 mut self,
2366 v: T,
2367 ) -> Self {
2368 self.extraction_strategy = std::option::Option::Some(
2369 crate::model::sprite_sheet::ExtractionStrategy::Interval(v.into()),
2370 );
2371 self
2372 }
2373}
2374
2375impl wkt::message::Message for SpriteSheet {
2376 fn typename() -> &'static str {
2377 "type.googleapis.com/google.cloud.video.transcoder.v1.SpriteSheet"
2378 }
2379}
2380
2381pub mod sprite_sheet {
2383 #[allow(unused_imports)]
2384 use super::*;
2385
2386 #[derive(Clone, Debug, PartialEq)]
2388 #[non_exhaustive]
2389 pub enum ExtractionStrategy {
2390 TotalCount(i32),
2394 Interval(std::boxed::Box<wkt::Duration>),
2397 }
2398}
2399
2400#[derive(Clone, Default, PartialEq)]
2402#[non_exhaustive]
2403pub struct Overlay {
2404 pub image: std::option::Option<crate::model::overlay::Image>,
2406
2407 pub animations: std::vec::Vec<crate::model::overlay::Animation>,
2410
2411 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2412}
2413
2414impl Overlay {
2415 pub fn new() -> Self {
2416 std::default::Default::default()
2417 }
2418
2419 pub fn set_image<T>(mut self, v: T) -> Self
2421 where
2422 T: std::convert::Into<crate::model::overlay::Image>,
2423 {
2424 self.image = std::option::Option::Some(v.into());
2425 self
2426 }
2427
2428 pub fn set_or_clear_image<T>(mut self, v: std::option::Option<T>) -> Self
2430 where
2431 T: std::convert::Into<crate::model::overlay::Image>,
2432 {
2433 self.image = v.map(|x| x.into());
2434 self
2435 }
2436
2437 pub fn set_animations<T, V>(mut self, v: T) -> Self
2439 where
2440 T: std::iter::IntoIterator<Item = V>,
2441 V: std::convert::Into<crate::model::overlay::Animation>,
2442 {
2443 use std::iter::Iterator;
2444 self.animations = v.into_iter().map(|i| i.into()).collect();
2445 self
2446 }
2447}
2448
2449impl wkt::message::Message for Overlay {
2450 fn typename() -> &'static str {
2451 "type.googleapis.com/google.cloud.video.transcoder.v1.Overlay"
2452 }
2453}
2454
2455pub mod overlay {
2457 #[allow(unused_imports)]
2458 use super::*;
2459
2460 #[derive(Clone, Default, PartialEq)]
2462 #[non_exhaustive]
2463 pub struct NormalizedCoordinate {
2464 pub x: f64,
2466
2467 pub y: f64,
2469
2470 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2471 }
2472
2473 impl NormalizedCoordinate {
2474 pub fn new() -> Self {
2475 std::default::Default::default()
2476 }
2477
2478 pub fn set_x<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
2480 self.x = v.into();
2481 self
2482 }
2483
2484 pub fn set_y<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
2486 self.y = v.into();
2487 self
2488 }
2489 }
2490
2491 impl wkt::message::Message for NormalizedCoordinate {
2492 fn typename() -> &'static str {
2493 "type.googleapis.com/google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate"
2494 }
2495 }
2496
2497 #[derive(Clone, Default, PartialEq)]
2499 #[non_exhaustive]
2500 pub struct Image {
2501 pub uri: std::string::String,
2504
2505 pub resolution: std::option::Option<crate::model::overlay::NormalizedCoordinate>,
2510
2511 pub alpha: f64,
2514
2515 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2516 }
2517
2518 impl Image {
2519 pub fn new() -> Self {
2520 std::default::Default::default()
2521 }
2522
2523 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2525 self.uri = v.into();
2526 self
2527 }
2528
2529 pub fn set_resolution<T>(mut self, v: T) -> Self
2531 where
2532 T: std::convert::Into<crate::model::overlay::NormalizedCoordinate>,
2533 {
2534 self.resolution = std::option::Option::Some(v.into());
2535 self
2536 }
2537
2538 pub fn set_or_clear_resolution<T>(mut self, v: std::option::Option<T>) -> Self
2540 where
2541 T: std::convert::Into<crate::model::overlay::NormalizedCoordinate>,
2542 {
2543 self.resolution = v.map(|x| x.into());
2544 self
2545 }
2546
2547 pub fn set_alpha<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
2549 self.alpha = v.into();
2550 self
2551 }
2552 }
2553
2554 impl wkt::message::Message for Image {
2555 fn typename() -> &'static str {
2556 "type.googleapis.com/google.cloud.video.transcoder.v1.Overlay.Image"
2557 }
2558 }
2559
2560 #[derive(Clone, Default, PartialEq)]
2562 #[non_exhaustive]
2563 pub struct AnimationStatic {
2564 pub xy: std::option::Option<crate::model::overlay::NormalizedCoordinate>,
2570
2571 pub start_time_offset: std::option::Option<wkt::Duration>,
2573
2574 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2575 }
2576
2577 impl AnimationStatic {
2578 pub fn new() -> Self {
2579 std::default::Default::default()
2580 }
2581
2582 pub fn set_xy<T>(mut self, v: T) -> Self
2584 where
2585 T: std::convert::Into<crate::model::overlay::NormalizedCoordinate>,
2586 {
2587 self.xy = std::option::Option::Some(v.into());
2588 self
2589 }
2590
2591 pub fn set_or_clear_xy<T>(mut self, v: std::option::Option<T>) -> Self
2593 where
2594 T: std::convert::Into<crate::model::overlay::NormalizedCoordinate>,
2595 {
2596 self.xy = v.map(|x| x.into());
2597 self
2598 }
2599
2600 pub fn set_start_time_offset<T>(mut self, v: T) -> Self
2602 where
2603 T: std::convert::Into<wkt::Duration>,
2604 {
2605 self.start_time_offset = std::option::Option::Some(v.into());
2606 self
2607 }
2608
2609 pub fn set_or_clear_start_time_offset<T>(mut self, v: std::option::Option<T>) -> Self
2611 where
2612 T: std::convert::Into<wkt::Duration>,
2613 {
2614 self.start_time_offset = v.map(|x| x.into());
2615 self
2616 }
2617 }
2618
2619 impl wkt::message::Message for AnimationStatic {
2620 fn typename() -> &'static str {
2621 "type.googleapis.com/google.cloud.video.transcoder.v1.Overlay.AnimationStatic"
2622 }
2623 }
2624
2625 #[derive(Clone, Default, PartialEq)]
2627 #[non_exhaustive]
2628 pub struct AnimationFade {
2629 pub fade_type: crate::model::overlay::FadeType,
2631
2632 pub xy: std::option::Option<crate::model::overlay::NormalizedCoordinate>,
2638
2639 pub start_time_offset: std::option::Option<wkt::Duration>,
2641
2642 pub end_time_offset: std::option::Option<wkt::Duration>,
2645
2646 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2647 }
2648
2649 impl AnimationFade {
2650 pub fn new() -> Self {
2651 std::default::Default::default()
2652 }
2653
2654 pub fn set_fade_type<T: std::convert::Into<crate::model::overlay::FadeType>>(
2656 mut self,
2657 v: T,
2658 ) -> Self {
2659 self.fade_type = v.into();
2660 self
2661 }
2662
2663 pub fn set_xy<T>(mut self, v: T) -> Self
2665 where
2666 T: std::convert::Into<crate::model::overlay::NormalizedCoordinate>,
2667 {
2668 self.xy = std::option::Option::Some(v.into());
2669 self
2670 }
2671
2672 pub fn set_or_clear_xy<T>(mut self, v: std::option::Option<T>) -> Self
2674 where
2675 T: std::convert::Into<crate::model::overlay::NormalizedCoordinate>,
2676 {
2677 self.xy = v.map(|x| x.into());
2678 self
2679 }
2680
2681 pub fn set_start_time_offset<T>(mut self, v: T) -> Self
2683 where
2684 T: std::convert::Into<wkt::Duration>,
2685 {
2686 self.start_time_offset = std::option::Option::Some(v.into());
2687 self
2688 }
2689
2690 pub fn set_or_clear_start_time_offset<T>(mut self, v: std::option::Option<T>) -> Self
2692 where
2693 T: std::convert::Into<wkt::Duration>,
2694 {
2695 self.start_time_offset = v.map(|x| x.into());
2696 self
2697 }
2698
2699 pub fn set_end_time_offset<T>(mut self, v: T) -> Self
2701 where
2702 T: std::convert::Into<wkt::Duration>,
2703 {
2704 self.end_time_offset = std::option::Option::Some(v.into());
2705 self
2706 }
2707
2708 pub fn set_or_clear_end_time_offset<T>(mut self, v: std::option::Option<T>) -> Self
2710 where
2711 T: std::convert::Into<wkt::Duration>,
2712 {
2713 self.end_time_offset = v.map(|x| x.into());
2714 self
2715 }
2716 }
2717
2718 impl wkt::message::Message for AnimationFade {
2719 fn typename() -> &'static str {
2720 "type.googleapis.com/google.cloud.video.transcoder.v1.Overlay.AnimationFade"
2721 }
2722 }
2723
2724 #[derive(Clone, Default, PartialEq)]
2728 #[non_exhaustive]
2729 pub struct AnimationEnd {
2730 pub start_time_offset: std::option::Option<wkt::Duration>,
2732
2733 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2734 }
2735
2736 impl AnimationEnd {
2737 pub fn new() -> Self {
2738 std::default::Default::default()
2739 }
2740
2741 pub fn set_start_time_offset<T>(mut self, v: T) -> Self
2743 where
2744 T: std::convert::Into<wkt::Duration>,
2745 {
2746 self.start_time_offset = std::option::Option::Some(v.into());
2747 self
2748 }
2749
2750 pub fn set_or_clear_start_time_offset<T>(mut self, v: std::option::Option<T>) -> Self
2752 where
2753 T: std::convert::Into<wkt::Duration>,
2754 {
2755 self.start_time_offset = v.map(|x| x.into());
2756 self
2757 }
2758 }
2759
2760 impl wkt::message::Message for AnimationEnd {
2761 fn typename() -> &'static str {
2762 "type.googleapis.com/google.cloud.video.transcoder.v1.Overlay.AnimationEnd"
2763 }
2764 }
2765
2766 #[derive(Clone, Default, PartialEq)]
2768 #[non_exhaustive]
2769 pub struct Animation {
2770 pub animation_type: std::option::Option<crate::model::overlay::animation::AnimationType>,
2772
2773 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2774 }
2775
2776 impl Animation {
2777 pub fn new() -> Self {
2778 std::default::Default::default()
2779 }
2780
2781 pub fn set_animation_type<
2786 T: std::convert::Into<
2787 std::option::Option<crate::model::overlay::animation::AnimationType>,
2788 >,
2789 >(
2790 mut self,
2791 v: T,
2792 ) -> Self {
2793 self.animation_type = v.into();
2794 self
2795 }
2796
2797 pub fn animation_static(
2801 &self,
2802 ) -> std::option::Option<&std::boxed::Box<crate::model::overlay::AnimationStatic>> {
2803 #[allow(unreachable_patterns)]
2804 self.animation_type.as_ref().and_then(|v| match v {
2805 crate::model::overlay::animation::AnimationType::AnimationStatic(v) => {
2806 std::option::Option::Some(v)
2807 }
2808 _ => std::option::Option::None,
2809 })
2810 }
2811
2812 pub fn set_animation_static<
2818 T: std::convert::Into<std::boxed::Box<crate::model::overlay::AnimationStatic>>,
2819 >(
2820 mut self,
2821 v: T,
2822 ) -> Self {
2823 self.animation_type = std::option::Option::Some(
2824 crate::model::overlay::animation::AnimationType::AnimationStatic(v.into()),
2825 );
2826 self
2827 }
2828
2829 pub fn animation_fade(
2833 &self,
2834 ) -> std::option::Option<&std::boxed::Box<crate::model::overlay::AnimationFade>> {
2835 #[allow(unreachable_patterns)]
2836 self.animation_type.as_ref().and_then(|v| match v {
2837 crate::model::overlay::animation::AnimationType::AnimationFade(v) => {
2838 std::option::Option::Some(v)
2839 }
2840 _ => std::option::Option::None,
2841 })
2842 }
2843
2844 pub fn set_animation_fade<
2850 T: std::convert::Into<std::boxed::Box<crate::model::overlay::AnimationFade>>,
2851 >(
2852 mut self,
2853 v: T,
2854 ) -> Self {
2855 self.animation_type = std::option::Option::Some(
2856 crate::model::overlay::animation::AnimationType::AnimationFade(v.into()),
2857 );
2858 self
2859 }
2860
2861 pub fn animation_end(
2865 &self,
2866 ) -> std::option::Option<&std::boxed::Box<crate::model::overlay::AnimationEnd>> {
2867 #[allow(unreachable_patterns)]
2868 self.animation_type.as_ref().and_then(|v| match v {
2869 crate::model::overlay::animation::AnimationType::AnimationEnd(v) => {
2870 std::option::Option::Some(v)
2871 }
2872 _ => std::option::Option::None,
2873 })
2874 }
2875
2876 pub fn set_animation_end<
2882 T: std::convert::Into<std::boxed::Box<crate::model::overlay::AnimationEnd>>,
2883 >(
2884 mut self,
2885 v: T,
2886 ) -> Self {
2887 self.animation_type = std::option::Option::Some(
2888 crate::model::overlay::animation::AnimationType::AnimationEnd(v.into()),
2889 );
2890 self
2891 }
2892 }
2893
2894 impl wkt::message::Message for Animation {
2895 fn typename() -> &'static str {
2896 "type.googleapis.com/google.cloud.video.transcoder.v1.Overlay.Animation"
2897 }
2898 }
2899
2900 pub mod animation {
2902 #[allow(unused_imports)]
2903 use super::*;
2904
2905 #[derive(Clone, Debug, PartialEq)]
2907 #[non_exhaustive]
2908 pub enum AnimationType {
2909 AnimationStatic(std::boxed::Box<crate::model::overlay::AnimationStatic>),
2911 AnimationFade(std::boxed::Box<crate::model::overlay::AnimationFade>),
2913 AnimationEnd(std::boxed::Box<crate::model::overlay::AnimationEnd>),
2915 }
2916 }
2917
2918 #[derive(Clone, Debug, PartialEq)]
2934 #[non_exhaustive]
2935 pub enum FadeType {
2936 Unspecified,
2938 FadeIn,
2940 FadeOut,
2942 UnknownValue(fade_type::UnknownValue),
2947 }
2948
2949 #[doc(hidden)]
2950 pub mod fade_type {
2951 #[allow(unused_imports)]
2952 use super::*;
2953 #[derive(Clone, Debug, PartialEq)]
2954 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2955 }
2956
2957 impl FadeType {
2958 pub fn value(&self) -> std::option::Option<i32> {
2963 match self {
2964 Self::Unspecified => std::option::Option::Some(0),
2965 Self::FadeIn => std::option::Option::Some(1),
2966 Self::FadeOut => std::option::Option::Some(2),
2967 Self::UnknownValue(u) => u.0.value(),
2968 }
2969 }
2970
2971 pub fn name(&self) -> std::option::Option<&str> {
2976 match self {
2977 Self::Unspecified => std::option::Option::Some("FADE_TYPE_UNSPECIFIED"),
2978 Self::FadeIn => std::option::Option::Some("FADE_IN"),
2979 Self::FadeOut => std::option::Option::Some("FADE_OUT"),
2980 Self::UnknownValue(u) => u.0.name(),
2981 }
2982 }
2983 }
2984
2985 impl std::default::Default for FadeType {
2986 fn default() -> Self {
2987 use std::convert::From;
2988 Self::from(0)
2989 }
2990 }
2991
2992 impl std::fmt::Display for FadeType {
2993 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2994 wkt::internal::display_enum(f, self.name(), self.value())
2995 }
2996 }
2997
2998 impl std::convert::From<i32> for FadeType {
2999 fn from(value: i32) -> Self {
3000 match value {
3001 0 => Self::Unspecified,
3002 1 => Self::FadeIn,
3003 2 => Self::FadeOut,
3004 _ => Self::UnknownValue(fade_type::UnknownValue(
3005 wkt::internal::UnknownEnumValue::Integer(value),
3006 )),
3007 }
3008 }
3009 }
3010
3011 impl std::convert::From<&str> for FadeType {
3012 fn from(value: &str) -> Self {
3013 use std::string::ToString;
3014 match value {
3015 "FADE_TYPE_UNSPECIFIED" => Self::Unspecified,
3016 "FADE_IN" => Self::FadeIn,
3017 "FADE_OUT" => Self::FadeOut,
3018 _ => Self::UnknownValue(fade_type::UnknownValue(
3019 wkt::internal::UnknownEnumValue::String(value.to_string()),
3020 )),
3021 }
3022 }
3023 }
3024
3025 impl serde::ser::Serialize for FadeType {
3026 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3027 where
3028 S: serde::Serializer,
3029 {
3030 match self {
3031 Self::Unspecified => serializer.serialize_i32(0),
3032 Self::FadeIn => serializer.serialize_i32(1),
3033 Self::FadeOut => serializer.serialize_i32(2),
3034 Self::UnknownValue(u) => u.0.serialize(serializer),
3035 }
3036 }
3037 }
3038
3039 impl<'de> serde::de::Deserialize<'de> for FadeType {
3040 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3041 where
3042 D: serde::Deserializer<'de>,
3043 {
3044 deserializer.deserialize_any(wkt::internal::EnumVisitor::<FadeType>::new(
3045 ".google.cloud.video.transcoder.v1.Overlay.FadeType",
3046 ))
3047 }
3048 }
3049}
3050
3051#[derive(Clone, Default, PartialEq)]
3053#[non_exhaustive]
3054pub struct PreprocessingConfig {
3055 pub color: std::option::Option<crate::model::preprocessing_config::Color>,
3057
3058 pub denoise: std::option::Option<crate::model::preprocessing_config::Denoise>,
3060
3061 pub deblock: std::option::Option<crate::model::preprocessing_config::Deblock>,
3063
3064 pub audio: std::option::Option<crate::model::preprocessing_config::Audio>,
3066
3067 pub crop: std::option::Option<crate::model::preprocessing_config::Crop>,
3069
3070 pub pad: std::option::Option<crate::model::preprocessing_config::Pad>,
3072
3073 pub deinterlace: std::option::Option<crate::model::preprocessing_config::Deinterlace>,
3075
3076 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3077}
3078
3079impl PreprocessingConfig {
3080 pub fn new() -> Self {
3081 std::default::Default::default()
3082 }
3083
3084 pub fn set_color<T>(mut self, v: T) -> Self
3086 where
3087 T: std::convert::Into<crate::model::preprocessing_config::Color>,
3088 {
3089 self.color = std::option::Option::Some(v.into());
3090 self
3091 }
3092
3093 pub fn set_or_clear_color<T>(mut self, v: std::option::Option<T>) -> Self
3095 where
3096 T: std::convert::Into<crate::model::preprocessing_config::Color>,
3097 {
3098 self.color = v.map(|x| x.into());
3099 self
3100 }
3101
3102 pub fn set_denoise<T>(mut self, v: T) -> Self
3104 where
3105 T: std::convert::Into<crate::model::preprocessing_config::Denoise>,
3106 {
3107 self.denoise = std::option::Option::Some(v.into());
3108 self
3109 }
3110
3111 pub fn set_or_clear_denoise<T>(mut self, v: std::option::Option<T>) -> Self
3113 where
3114 T: std::convert::Into<crate::model::preprocessing_config::Denoise>,
3115 {
3116 self.denoise = v.map(|x| x.into());
3117 self
3118 }
3119
3120 pub fn set_deblock<T>(mut self, v: T) -> Self
3122 where
3123 T: std::convert::Into<crate::model::preprocessing_config::Deblock>,
3124 {
3125 self.deblock = std::option::Option::Some(v.into());
3126 self
3127 }
3128
3129 pub fn set_or_clear_deblock<T>(mut self, v: std::option::Option<T>) -> Self
3131 where
3132 T: std::convert::Into<crate::model::preprocessing_config::Deblock>,
3133 {
3134 self.deblock = v.map(|x| x.into());
3135 self
3136 }
3137
3138 pub fn set_audio<T>(mut self, v: T) -> Self
3140 where
3141 T: std::convert::Into<crate::model::preprocessing_config::Audio>,
3142 {
3143 self.audio = std::option::Option::Some(v.into());
3144 self
3145 }
3146
3147 pub fn set_or_clear_audio<T>(mut self, v: std::option::Option<T>) -> Self
3149 where
3150 T: std::convert::Into<crate::model::preprocessing_config::Audio>,
3151 {
3152 self.audio = v.map(|x| x.into());
3153 self
3154 }
3155
3156 pub fn set_crop<T>(mut self, v: T) -> Self
3158 where
3159 T: std::convert::Into<crate::model::preprocessing_config::Crop>,
3160 {
3161 self.crop = std::option::Option::Some(v.into());
3162 self
3163 }
3164
3165 pub fn set_or_clear_crop<T>(mut self, v: std::option::Option<T>) -> Self
3167 where
3168 T: std::convert::Into<crate::model::preprocessing_config::Crop>,
3169 {
3170 self.crop = v.map(|x| x.into());
3171 self
3172 }
3173
3174 pub fn set_pad<T>(mut self, v: T) -> Self
3176 where
3177 T: std::convert::Into<crate::model::preprocessing_config::Pad>,
3178 {
3179 self.pad = std::option::Option::Some(v.into());
3180 self
3181 }
3182
3183 pub fn set_or_clear_pad<T>(mut self, v: std::option::Option<T>) -> Self
3185 where
3186 T: std::convert::Into<crate::model::preprocessing_config::Pad>,
3187 {
3188 self.pad = v.map(|x| x.into());
3189 self
3190 }
3191
3192 pub fn set_deinterlace<T>(mut self, v: T) -> Self
3194 where
3195 T: std::convert::Into<crate::model::preprocessing_config::Deinterlace>,
3196 {
3197 self.deinterlace = std::option::Option::Some(v.into());
3198 self
3199 }
3200
3201 pub fn set_or_clear_deinterlace<T>(mut self, v: std::option::Option<T>) -> Self
3203 where
3204 T: std::convert::Into<crate::model::preprocessing_config::Deinterlace>,
3205 {
3206 self.deinterlace = v.map(|x| x.into());
3207 self
3208 }
3209}
3210
3211impl wkt::message::Message for PreprocessingConfig {
3212 fn typename() -> &'static str {
3213 "type.googleapis.com/google.cloud.video.transcoder.v1.PreprocessingConfig"
3214 }
3215}
3216
3217pub mod preprocessing_config {
3219 #[allow(unused_imports)]
3220 use super::*;
3221
3222 #[derive(Clone, Default, PartialEq)]
3226 #[non_exhaustive]
3227 pub struct Color {
3228 pub saturation: f64,
3232
3233 pub contrast: f64,
3237
3238 pub brightness: f64,
3242
3243 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3244 }
3245
3246 impl Color {
3247 pub fn new() -> Self {
3248 std::default::Default::default()
3249 }
3250
3251 pub fn set_saturation<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3253 self.saturation = v.into();
3254 self
3255 }
3256
3257 pub fn set_contrast<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3259 self.contrast = v.into();
3260 self
3261 }
3262
3263 pub fn set_brightness<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3265 self.brightness = v.into();
3266 self
3267 }
3268 }
3269
3270 impl wkt::message::Message for Color {
3271 fn typename() -> &'static str {
3272 "type.googleapis.com/google.cloud.video.transcoder.v1.PreprocessingConfig.Color"
3273 }
3274 }
3275
3276 #[derive(Clone, Default, PartialEq)]
3280 #[non_exhaustive]
3281 pub struct Denoise {
3282 pub strength: f64,
3285
3286 pub tune: std::string::String,
3293
3294 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3295 }
3296
3297 impl Denoise {
3298 pub fn new() -> Self {
3299 std::default::Default::default()
3300 }
3301
3302 pub fn set_strength<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3304 self.strength = v.into();
3305 self
3306 }
3307
3308 pub fn set_tune<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3310 self.tune = v.into();
3311 self
3312 }
3313 }
3314
3315 impl wkt::message::Message for Denoise {
3316 fn typename() -> &'static str {
3317 "type.googleapis.com/google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise"
3318 }
3319 }
3320
3321 #[derive(Clone, Default, PartialEq)]
3325 #[non_exhaustive]
3326 pub struct Deblock {
3327 pub strength: f64,
3331
3332 pub enabled: bool,
3334
3335 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3336 }
3337
3338 impl Deblock {
3339 pub fn new() -> Self {
3340 std::default::Default::default()
3341 }
3342
3343 pub fn set_strength<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3345 self.strength = v.into();
3346 self
3347 }
3348
3349 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3351 self.enabled = v.into();
3352 self
3353 }
3354 }
3355
3356 impl wkt::message::Message for Deblock {
3357 fn typename() -> &'static str {
3358 "type.googleapis.com/google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock"
3359 }
3360 }
3361
3362 #[derive(Clone, Default, PartialEq)]
3364 #[non_exhaustive]
3365 pub struct Audio {
3366 pub lufs: f64,
3378
3379 pub high_boost: bool,
3383
3384 pub low_boost: bool,
3388
3389 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3390 }
3391
3392 impl Audio {
3393 pub fn new() -> Self {
3394 std::default::Default::default()
3395 }
3396
3397 pub fn set_lufs<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3399 self.lufs = v.into();
3400 self
3401 }
3402
3403 pub fn set_high_boost<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3405 self.high_boost = v.into();
3406 self
3407 }
3408
3409 pub fn set_low_boost<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3411 self.low_boost = v.into();
3412 self
3413 }
3414 }
3415
3416 impl wkt::message::Message for Audio {
3417 fn typename() -> &'static str {
3418 "type.googleapis.com/google.cloud.video.transcoder.v1.PreprocessingConfig.Audio"
3419 }
3420 }
3421
3422 #[derive(Clone, Default, PartialEq)]
3425 #[non_exhaustive]
3426 pub struct Crop {
3427 pub top_pixels: i32,
3429
3430 pub bottom_pixels: i32,
3432
3433 pub left_pixels: i32,
3435
3436 pub right_pixels: i32,
3438
3439 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3440 }
3441
3442 impl Crop {
3443 pub fn new() -> Self {
3444 std::default::Default::default()
3445 }
3446
3447 pub fn set_top_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3449 self.top_pixels = v.into();
3450 self
3451 }
3452
3453 pub fn set_bottom_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3455 self.bottom_pixels = v.into();
3456 self
3457 }
3458
3459 pub fn set_left_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3461 self.left_pixels = v.into();
3462 self
3463 }
3464
3465 pub fn set_right_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3467 self.right_pixels = v.into();
3468 self
3469 }
3470 }
3471
3472 impl wkt::message::Message for Crop {
3473 fn typename() -> &'static str {
3474 "type.googleapis.com/google.cloud.video.transcoder.v1.PreprocessingConfig.Crop"
3475 }
3476 }
3477
3478 #[derive(Clone, Default, PartialEq)]
3481 #[non_exhaustive]
3482 pub struct Pad {
3483 pub top_pixels: i32,
3485
3486 pub bottom_pixels: i32,
3488
3489 pub left_pixels: i32,
3491
3492 pub right_pixels: i32,
3494
3495 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3496 }
3497
3498 impl Pad {
3499 pub fn new() -> Self {
3500 std::default::Default::default()
3501 }
3502
3503 pub fn set_top_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3505 self.top_pixels = v.into();
3506 self
3507 }
3508
3509 pub fn set_bottom_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3511 self.bottom_pixels = v.into();
3512 self
3513 }
3514
3515 pub fn set_left_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3517 self.left_pixels = v.into();
3518 self
3519 }
3520
3521 pub fn set_right_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3523 self.right_pixels = v.into();
3524 self
3525 }
3526 }
3527
3528 impl wkt::message::Message for Pad {
3529 fn typename() -> &'static str {
3530 "type.googleapis.com/google.cloud.video.transcoder.v1.PreprocessingConfig.Pad"
3531 }
3532 }
3533
3534 #[derive(Clone, Default, PartialEq)]
3536 #[non_exhaustive]
3537 pub struct Deinterlace {
3538 pub deinterlacing_filter: std::option::Option<
3540 crate::model::preprocessing_config::deinterlace::DeinterlacingFilter,
3541 >,
3542
3543 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3544 }
3545
3546 impl Deinterlace {
3547 pub fn new() -> Self {
3548 std::default::Default::default()
3549 }
3550
3551 pub fn set_deinterlacing_filter<
3556 T: std::convert::Into<
3557 std::option::Option<
3558 crate::model::preprocessing_config::deinterlace::DeinterlacingFilter,
3559 >,
3560 >,
3561 >(
3562 mut self,
3563 v: T,
3564 ) -> Self {
3565 self.deinterlacing_filter = v.into();
3566 self
3567 }
3568
3569 pub fn yadif(
3573 &self,
3574 ) -> std::option::Option<
3575 &std::boxed::Box<crate::model::preprocessing_config::deinterlace::YadifConfig>,
3576 > {
3577 #[allow(unreachable_patterns)]
3578 self.deinterlacing_filter.as_ref().and_then(|v| match v {
3579 crate::model::preprocessing_config::deinterlace::DeinterlacingFilter::Yadif(v) => {
3580 std::option::Option::Some(v)
3581 }
3582 _ => std::option::Option::None,
3583 })
3584 }
3585
3586 pub fn set_yadif<
3592 T: std::convert::Into<
3593 std::boxed::Box<crate::model::preprocessing_config::deinterlace::YadifConfig>,
3594 >,
3595 >(
3596 mut self,
3597 v: T,
3598 ) -> Self {
3599 self.deinterlacing_filter = std::option::Option::Some(
3600 crate::model::preprocessing_config::deinterlace::DeinterlacingFilter::Yadif(
3601 v.into(),
3602 ),
3603 );
3604 self
3605 }
3606
3607 pub fn bwdif(
3611 &self,
3612 ) -> std::option::Option<
3613 &std::boxed::Box<crate::model::preprocessing_config::deinterlace::BwdifConfig>,
3614 > {
3615 #[allow(unreachable_patterns)]
3616 self.deinterlacing_filter.as_ref().and_then(|v| match v {
3617 crate::model::preprocessing_config::deinterlace::DeinterlacingFilter::Bwdif(v) => {
3618 std::option::Option::Some(v)
3619 }
3620 _ => std::option::Option::None,
3621 })
3622 }
3623
3624 pub fn set_bwdif<
3630 T: std::convert::Into<
3631 std::boxed::Box<crate::model::preprocessing_config::deinterlace::BwdifConfig>,
3632 >,
3633 >(
3634 mut self,
3635 v: T,
3636 ) -> Self {
3637 self.deinterlacing_filter = std::option::Option::Some(
3638 crate::model::preprocessing_config::deinterlace::DeinterlacingFilter::Bwdif(
3639 v.into(),
3640 ),
3641 );
3642 self
3643 }
3644 }
3645
3646 impl wkt::message::Message for Deinterlace {
3647 fn typename() -> &'static str {
3648 "type.googleapis.com/google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace"
3649 }
3650 }
3651
3652 pub mod deinterlace {
3654 #[allow(unused_imports)]
3655 use super::*;
3656
3657 #[derive(Clone, Default, PartialEq)]
3659 #[non_exhaustive]
3660 pub struct YadifConfig {
3661 pub mode: std::string::String,
3668
3669 pub disable_spatial_interlacing: bool,
3672
3673 pub parity: std::string::String,
3681
3682 pub deinterlace_all_frames: bool,
3685
3686 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3687 }
3688
3689 impl YadifConfig {
3690 pub fn new() -> Self {
3691 std::default::Default::default()
3692 }
3693
3694 pub fn set_mode<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3696 self.mode = v.into();
3697 self
3698 }
3699
3700 pub fn set_disable_spatial_interlacing<T: std::convert::Into<bool>>(
3702 mut self,
3703 v: T,
3704 ) -> Self {
3705 self.disable_spatial_interlacing = v.into();
3706 self
3707 }
3708
3709 pub fn set_parity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3711 self.parity = v.into();
3712 self
3713 }
3714
3715 pub fn set_deinterlace_all_frames<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3717 self.deinterlace_all_frames = v.into();
3718 self
3719 }
3720 }
3721
3722 impl wkt::message::Message for YadifConfig {
3723 fn typename() -> &'static str {
3724 "type.googleapis.com/google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig"
3725 }
3726 }
3727
3728 #[derive(Clone, Default, PartialEq)]
3730 #[non_exhaustive]
3731 pub struct BwdifConfig {
3732 pub mode: std::string::String,
3739
3740 pub parity: std::string::String,
3748
3749 pub deinterlace_all_frames: bool,
3752
3753 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3754 }
3755
3756 impl BwdifConfig {
3757 pub fn new() -> Self {
3758 std::default::Default::default()
3759 }
3760
3761 pub fn set_mode<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3763 self.mode = v.into();
3764 self
3765 }
3766
3767 pub fn set_parity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3769 self.parity = v.into();
3770 self
3771 }
3772
3773 pub fn set_deinterlace_all_frames<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3775 self.deinterlace_all_frames = v.into();
3776 self
3777 }
3778 }
3779
3780 impl wkt::message::Message for BwdifConfig {
3781 fn typename() -> &'static str {
3782 "type.googleapis.com/google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig"
3783 }
3784 }
3785
3786 #[derive(Clone, Debug, PartialEq)]
3788 #[non_exhaustive]
3789 pub enum DeinterlacingFilter {
3790 Yadif(std::boxed::Box<crate::model::preprocessing_config::deinterlace::YadifConfig>),
3792 Bwdif(std::boxed::Box<crate::model::preprocessing_config::deinterlace::BwdifConfig>),
3794 }
3795 }
3796}
3797
3798#[derive(Clone, Default, PartialEq)]
3800#[non_exhaustive]
3801pub struct TrackDefinition {
3802 pub input_track: std::option::Option<i32>,
3804
3805 pub languages: std::vec::Vec<std::string::String>,
3809
3810 pub detect_languages: bool,
3814
3815 pub detected_languages: std::vec::Vec<std::string::String>,
3821
3822 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3823}
3824
3825impl TrackDefinition {
3826 pub fn new() -> Self {
3827 std::default::Default::default()
3828 }
3829
3830 pub fn set_input_track<T>(mut self, v: T) -> Self
3832 where
3833 T: std::convert::Into<i32>,
3834 {
3835 self.input_track = std::option::Option::Some(v.into());
3836 self
3837 }
3838
3839 pub fn set_or_clear_input_track<T>(mut self, v: std::option::Option<T>) -> Self
3841 where
3842 T: std::convert::Into<i32>,
3843 {
3844 self.input_track = v.map(|x| x.into());
3845 self
3846 }
3847
3848 pub fn set_languages<T, V>(mut self, v: T) -> Self
3850 where
3851 T: std::iter::IntoIterator<Item = V>,
3852 V: std::convert::Into<std::string::String>,
3853 {
3854 use std::iter::Iterator;
3855 self.languages = v.into_iter().map(|i| i.into()).collect();
3856 self
3857 }
3858
3859 pub fn set_detect_languages<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3861 self.detect_languages = v.into();
3862 self
3863 }
3864
3865 pub fn set_detected_languages<T, V>(mut self, v: T) -> Self
3867 where
3868 T: std::iter::IntoIterator<Item = V>,
3869 V: std::convert::Into<std::string::String>,
3870 {
3871 use std::iter::Iterator;
3872 self.detected_languages = v.into_iter().map(|i| i.into()).collect();
3873 self
3874 }
3875}
3876
3877impl wkt::message::Message for TrackDefinition {
3878 fn typename() -> &'static str {
3879 "type.googleapis.com/google.cloud.video.transcoder.v1.TrackDefinition"
3880 }
3881}
3882
3883#[derive(Clone, Default, PartialEq)]
3885#[non_exhaustive]
3886pub struct InputAttributes {
3887 pub track_definitions: std::vec::Vec<crate::model::TrackDefinition>,
3889
3890 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3891}
3892
3893impl InputAttributes {
3894 pub fn new() -> Self {
3895 std::default::Default::default()
3896 }
3897
3898 pub fn set_track_definitions<T, V>(mut self, v: T) -> Self
3900 where
3901 T: std::iter::IntoIterator<Item = V>,
3902 V: std::convert::Into<crate::model::TrackDefinition>,
3903 {
3904 use std::iter::Iterator;
3905 self.track_definitions = v.into_iter().map(|i| i.into()).collect();
3906 self
3907 }
3908}
3909
3910impl wkt::message::Message for InputAttributes {
3911 fn typename() -> &'static str {
3912 "type.googleapis.com/google.cloud.video.transcoder.v1.InputAttributes"
3913 }
3914}
3915
3916#[derive(Clone, Default, PartialEq)]
3918#[non_exhaustive]
3919pub struct VideoStream {
3920 pub codec_settings: std::option::Option<crate::model::video_stream::CodecSettings>,
3922
3923 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3924}
3925
3926impl VideoStream {
3927 pub fn new() -> Self {
3928 std::default::Default::default()
3929 }
3930
3931 pub fn set_codec_settings<
3936 T: std::convert::Into<std::option::Option<crate::model::video_stream::CodecSettings>>,
3937 >(
3938 mut self,
3939 v: T,
3940 ) -> Self {
3941 self.codec_settings = v.into();
3942 self
3943 }
3944
3945 pub fn h264(
3949 &self,
3950 ) -> std::option::Option<&std::boxed::Box<crate::model::video_stream::H264CodecSettings>> {
3951 #[allow(unreachable_patterns)]
3952 self.codec_settings.as_ref().and_then(|v| match v {
3953 crate::model::video_stream::CodecSettings::H264(v) => std::option::Option::Some(v),
3954 _ => std::option::Option::None,
3955 })
3956 }
3957
3958 pub fn set_h264<
3964 T: std::convert::Into<std::boxed::Box<crate::model::video_stream::H264CodecSettings>>,
3965 >(
3966 mut self,
3967 v: T,
3968 ) -> Self {
3969 self.codec_settings =
3970 std::option::Option::Some(crate::model::video_stream::CodecSettings::H264(v.into()));
3971 self
3972 }
3973
3974 pub fn h265(
3978 &self,
3979 ) -> std::option::Option<&std::boxed::Box<crate::model::video_stream::H265CodecSettings>> {
3980 #[allow(unreachable_patterns)]
3981 self.codec_settings.as_ref().and_then(|v| match v {
3982 crate::model::video_stream::CodecSettings::H265(v) => std::option::Option::Some(v),
3983 _ => std::option::Option::None,
3984 })
3985 }
3986
3987 pub fn set_h265<
3993 T: std::convert::Into<std::boxed::Box<crate::model::video_stream::H265CodecSettings>>,
3994 >(
3995 mut self,
3996 v: T,
3997 ) -> Self {
3998 self.codec_settings =
3999 std::option::Option::Some(crate::model::video_stream::CodecSettings::H265(v.into()));
4000 self
4001 }
4002
4003 pub fn vp9(
4007 &self,
4008 ) -> std::option::Option<&std::boxed::Box<crate::model::video_stream::Vp9CodecSettings>> {
4009 #[allow(unreachable_patterns)]
4010 self.codec_settings.as_ref().and_then(|v| match v {
4011 crate::model::video_stream::CodecSettings::Vp9(v) => std::option::Option::Some(v),
4012 _ => std::option::Option::None,
4013 })
4014 }
4015
4016 pub fn set_vp9<
4022 T: std::convert::Into<std::boxed::Box<crate::model::video_stream::Vp9CodecSettings>>,
4023 >(
4024 mut self,
4025 v: T,
4026 ) -> Self {
4027 self.codec_settings =
4028 std::option::Option::Some(crate::model::video_stream::CodecSettings::Vp9(v.into()));
4029 self
4030 }
4031}
4032
4033impl wkt::message::Message for VideoStream {
4034 fn typename() -> &'static str {
4035 "type.googleapis.com/google.cloud.video.transcoder.v1.VideoStream"
4036 }
4037}
4038
4039pub mod video_stream {
4041 #[allow(unused_imports)]
4042 use super::*;
4043
4044 #[derive(Clone, Default, PartialEq)]
4046 #[non_exhaustive]
4047 pub struct H264ColorFormatSDR {
4048 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4049 }
4050
4051 impl H264ColorFormatSDR {
4052 pub fn new() -> Self {
4053 std::default::Default::default()
4054 }
4055 }
4056
4057 impl wkt::message::Message for H264ColorFormatSDR {
4058 fn typename() -> &'static str {
4059 "type.googleapis.com/google.cloud.video.transcoder.v1.VideoStream.H264ColorFormatSDR"
4060 }
4061 }
4062
4063 #[derive(Clone, Default, PartialEq)]
4065 #[non_exhaustive]
4066 pub struct H264ColorFormatHLG {
4067 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4068 }
4069
4070 impl H264ColorFormatHLG {
4071 pub fn new() -> Self {
4072 std::default::Default::default()
4073 }
4074 }
4075
4076 impl wkt::message::Message for H264ColorFormatHLG {
4077 fn typename() -> &'static str {
4078 "type.googleapis.com/google.cloud.video.transcoder.v1.VideoStream.H264ColorFormatHLG"
4079 }
4080 }
4081
4082 #[derive(Clone, Default, PartialEq)]
4084 #[non_exhaustive]
4085 pub struct H264CodecSettings {
4086 pub width_pixels: i32,
4095
4096 pub height_pixels: i32,
4105
4106 pub frame_rate: f64,
4109
4110 pub frame_rate_conversion_strategy: crate::model::video_stream::FrameRateConversionStrategy,
4113
4114 pub bitrate_bps: i32,
4117
4118 pub pixel_format: std::string::String,
4132
4133 pub rate_control_mode: std::string::String,
4140
4141 pub crf_level: i32,
4144
4145 pub allow_open_gop: bool,
4148
4149 pub enable_two_pass: bool,
4155
4156 pub vbv_size_bits: i32,
4162
4163 pub vbv_fullness_bits: i32,
4169
4170 pub entropy_coder: std::string::String,
4177
4178 pub b_pyramid: bool,
4181
4182 pub b_frame_count: i32,
4189
4190 pub aq_strength: f64,
4194
4195 pub profile: std::string::String,
4208
4209 pub tune: std::string::String,
4215
4216 pub preset: std::string::String,
4223
4224 pub gop_mode:
4226 std::option::Option<crate::model::video_stream::h_264_codec_settings::GopMode>,
4227
4228 pub color_format:
4230 std::option::Option<crate::model::video_stream::h_264_codec_settings::ColorFormat>,
4231
4232 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4233 }
4234
4235 impl H264CodecSettings {
4236 pub fn new() -> Self {
4237 std::default::Default::default()
4238 }
4239
4240 pub fn set_width_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4242 self.width_pixels = v.into();
4243 self
4244 }
4245
4246 pub fn set_height_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4248 self.height_pixels = v.into();
4249 self
4250 }
4251
4252 pub fn set_frame_rate<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
4254 self.frame_rate = v.into();
4255 self
4256 }
4257
4258 pub fn set_frame_rate_conversion_strategy<
4260 T: std::convert::Into<crate::model::video_stream::FrameRateConversionStrategy>,
4261 >(
4262 mut self,
4263 v: T,
4264 ) -> Self {
4265 self.frame_rate_conversion_strategy = v.into();
4266 self
4267 }
4268
4269 pub fn set_bitrate_bps<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4271 self.bitrate_bps = v.into();
4272 self
4273 }
4274
4275 pub fn set_pixel_format<T: std::convert::Into<std::string::String>>(
4277 mut self,
4278 v: T,
4279 ) -> Self {
4280 self.pixel_format = v.into();
4281 self
4282 }
4283
4284 pub fn set_rate_control_mode<T: std::convert::Into<std::string::String>>(
4286 mut self,
4287 v: T,
4288 ) -> Self {
4289 self.rate_control_mode = v.into();
4290 self
4291 }
4292
4293 pub fn set_crf_level<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4295 self.crf_level = v.into();
4296 self
4297 }
4298
4299 pub fn set_allow_open_gop<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4301 self.allow_open_gop = v.into();
4302 self
4303 }
4304
4305 pub fn set_enable_two_pass<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4307 self.enable_two_pass = v.into();
4308 self
4309 }
4310
4311 pub fn set_vbv_size_bits<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4313 self.vbv_size_bits = v.into();
4314 self
4315 }
4316
4317 pub fn set_vbv_fullness_bits<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4319 self.vbv_fullness_bits = v.into();
4320 self
4321 }
4322
4323 pub fn set_entropy_coder<T: std::convert::Into<std::string::String>>(
4325 mut self,
4326 v: T,
4327 ) -> Self {
4328 self.entropy_coder = v.into();
4329 self
4330 }
4331
4332 pub fn set_b_pyramid<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4334 self.b_pyramid = v.into();
4335 self
4336 }
4337
4338 pub fn set_b_frame_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4340 self.b_frame_count = v.into();
4341 self
4342 }
4343
4344 pub fn set_aq_strength<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
4346 self.aq_strength = v.into();
4347 self
4348 }
4349
4350 pub fn set_profile<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4352 self.profile = v.into();
4353 self
4354 }
4355
4356 pub fn set_tune<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4358 self.tune = v.into();
4359 self
4360 }
4361
4362 pub fn set_preset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4364 self.preset = v.into();
4365 self
4366 }
4367
4368 pub fn set_gop_mode<
4373 T: std::convert::Into<
4374 std::option::Option<crate::model::video_stream::h_264_codec_settings::GopMode>,
4375 >,
4376 >(
4377 mut self,
4378 v: T,
4379 ) -> Self {
4380 self.gop_mode = v.into();
4381 self
4382 }
4383
4384 pub fn gop_frame_count(&self) -> std::option::Option<&i32> {
4388 #[allow(unreachable_patterns)]
4389 self.gop_mode.as_ref().and_then(|v| match v {
4390 crate::model::video_stream::h_264_codec_settings::GopMode::GopFrameCount(v) => {
4391 std::option::Option::Some(v)
4392 }
4393 _ => std::option::Option::None,
4394 })
4395 }
4396
4397 pub fn set_gop_frame_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4403 self.gop_mode = std::option::Option::Some(
4404 crate::model::video_stream::h_264_codec_settings::GopMode::GopFrameCount(v.into()),
4405 );
4406 self
4407 }
4408
4409 pub fn gop_duration(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
4413 #[allow(unreachable_patterns)]
4414 self.gop_mode.as_ref().and_then(|v| match v {
4415 crate::model::video_stream::h_264_codec_settings::GopMode::GopDuration(v) => {
4416 std::option::Option::Some(v)
4417 }
4418 _ => std::option::Option::None,
4419 })
4420 }
4421
4422 pub fn set_gop_duration<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
4428 mut self,
4429 v: T,
4430 ) -> Self {
4431 self.gop_mode = std::option::Option::Some(
4432 crate::model::video_stream::h_264_codec_settings::GopMode::GopDuration(v.into()),
4433 );
4434 self
4435 }
4436
4437 pub fn set_color_format<
4442 T: std::convert::Into<
4443 std::option::Option<
4444 crate::model::video_stream::h_264_codec_settings::ColorFormat,
4445 >,
4446 >,
4447 >(
4448 mut self,
4449 v: T,
4450 ) -> Self {
4451 self.color_format = v.into();
4452 self
4453 }
4454
4455 pub fn sdr(
4459 &self,
4460 ) -> std::option::Option<&std::boxed::Box<crate::model::video_stream::H264ColorFormatSDR>>
4461 {
4462 #[allow(unreachable_patterns)]
4463 self.color_format.as_ref().and_then(|v| match v {
4464 crate::model::video_stream::h_264_codec_settings::ColorFormat::Sdr(v) => {
4465 std::option::Option::Some(v)
4466 }
4467 _ => std::option::Option::None,
4468 })
4469 }
4470
4471 pub fn set_sdr<
4477 T: std::convert::Into<std::boxed::Box<crate::model::video_stream::H264ColorFormatSDR>>,
4478 >(
4479 mut self,
4480 v: T,
4481 ) -> Self {
4482 self.color_format = std::option::Option::Some(
4483 crate::model::video_stream::h_264_codec_settings::ColorFormat::Sdr(v.into()),
4484 );
4485 self
4486 }
4487
4488 pub fn hlg(
4492 &self,
4493 ) -> std::option::Option<&std::boxed::Box<crate::model::video_stream::H264ColorFormatHLG>>
4494 {
4495 #[allow(unreachable_patterns)]
4496 self.color_format.as_ref().and_then(|v| match v {
4497 crate::model::video_stream::h_264_codec_settings::ColorFormat::Hlg(v) => {
4498 std::option::Option::Some(v)
4499 }
4500 _ => std::option::Option::None,
4501 })
4502 }
4503
4504 pub fn set_hlg<
4510 T: std::convert::Into<std::boxed::Box<crate::model::video_stream::H264ColorFormatHLG>>,
4511 >(
4512 mut self,
4513 v: T,
4514 ) -> Self {
4515 self.color_format = std::option::Option::Some(
4516 crate::model::video_stream::h_264_codec_settings::ColorFormat::Hlg(v.into()),
4517 );
4518 self
4519 }
4520 }
4521
4522 impl wkt::message::Message for H264CodecSettings {
4523 fn typename() -> &'static str {
4524 "type.googleapis.com/google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings"
4525 }
4526 }
4527
4528 pub mod h_264_codec_settings {
4530 #[allow(unused_imports)]
4531 use super::*;
4532
4533 #[derive(Clone, Debug, PartialEq)]
4535 #[non_exhaustive]
4536 pub enum GopMode {
4537 GopFrameCount(i32),
4540 GopDuration(std::boxed::Box<wkt::Duration>),
4546 }
4547
4548 #[derive(Clone, Debug, PartialEq)]
4550 #[non_exhaustive]
4551 pub enum ColorFormat {
4552 Sdr(std::boxed::Box<crate::model::video_stream::H264ColorFormatSDR>),
4554 Hlg(std::boxed::Box<crate::model::video_stream::H264ColorFormatHLG>),
4556 }
4557 }
4558
4559 #[derive(Clone, Default, PartialEq)]
4561 #[non_exhaustive]
4562 pub struct H265ColorFormatSDR {
4563 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4564 }
4565
4566 impl H265ColorFormatSDR {
4567 pub fn new() -> Self {
4568 std::default::Default::default()
4569 }
4570 }
4571
4572 impl wkt::message::Message for H265ColorFormatSDR {
4573 fn typename() -> &'static str {
4574 "type.googleapis.com/google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatSDR"
4575 }
4576 }
4577
4578 #[derive(Clone, Default, PartialEq)]
4580 #[non_exhaustive]
4581 pub struct H265ColorFormatHLG {
4582 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4583 }
4584
4585 impl H265ColorFormatHLG {
4586 pub fn new() -> Self {
4587 std::default::Default::default()
4588 }
4589 }
4590
4591 impl wkt::message::Message for H265ColorFormatHLG {
4592 fn typename() -> &'static str {
4593 "type.googleapis.com/google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatHLG"
4594 }
4595 }
4596
4597 #[derive(Clone, Default, PartialEq)]
4599 #[non_exhaustive]
4600 pub struct H265ColorFormatHDR10 {
4601 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4602 }
4603
4604 impl H265ColorFormatHDR10 {
4605 pub fn new() -> Self {
4606 std::default::Default::default()
4607 }
4608 }
4609
4610 impl wkt::message::Message for H265ColorFormatHDR10 {
4611 fn typename() -> &'static str {
4612 "type.googleapis.com/google.cloud.video.transcoder.v1.VideoStream.H265ColorFormatHDR10"
4613 }
4614 }
4615
4616 #[derive(Clone, Default, PartialEq)]
4618 #[non_exhaustive]
4619 pub struct H265CodecSettings {
4620 pub width_pixels: i32,
4629
4630 pub height_pixels: i32,
4639
4640 pub frame_rate: f64,
4643
4644 pub frame_rate_conversion_strategy: crate::model::video_stream::FrameRateConversionStrategy,
4647
4648 pub bitrate_bps: i32,
4651
4652 pub pixel_format: std::string::String,
4666
4667 pub rate_control_mode: std::string::String,
4674
4675 pub crf_level: i32,
4678
4679 pub allow_open_gop: bool,
4682
4683 pub enable_two_pass: bool,
4689
4690 pub vbv_size_bits: i32,
4693
4694 pub vbv_fullness_bits: i32,
4700
4701 pub b_pyramid: bool,
4704
4705 pub b_frame_count: i32,
4712
4713 pub aq_strength: f64,
4717
4718 pub profile: std::string::String,
4746
4747 pub tune: std::string::String,
4753
4754 pub preset: std::string::String,
4761
4762 pub gop_mode:
4764 std::option::Option<crate::model::video_stream::h_265_codec_settings::GopMode>,
4765
4766 pub color_format:
4768 std::option::Option<crate::model::video_stream::h_265_codec_settings::ColorFormat>,
4769
4770 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4771 }
4772
4773 impl H265CodecSettings {
4774 pub fn new() -> Self {
4775 std::default::Default::default()
4776 }
4777
4778 pub fn set_width_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4780 self.width_pixels = v.into();
4781 self
4782 }
4783
4784 pub fn set_height_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4786 self.height_pixels = v.into();
4787 self
4788 }
4789
4790 pub fn set_frame_rate<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
4792 self.frame_rate = v.into();
4793 self
4794 }
4795
4796 pub fn set_frame_rate_conversion_strategy<
4798 T: std::convert::Into<crate::model::video_stream::FrameRateConversionStrategy>,
4799 >(
4800 mut self,
4801 v: T,
4802 ) -> Self {
4803 self.frame_rate_conversion_strategy = v.into();
4804 self
4805 }
4806
4807 pub fn set_bitrate_bps<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4809 self.bitrate_bps = v.into();
4810 self
4811 }
4812
4813 pub fn set_pixel_format<T: std::convert::Into<std::string::String>>(
4815 mut self,
4816 v: T,
4817 ) -> Self {
4818 self.pixel_format = v.into();
4819 self
4820 }
4821
4822 pub fn set_rate_control_mode<T: std::convert::Into<std::string::String>>(
4824 mut self,
4825 v: T,
4826 ) -> Self {
4827 self.rate_control_mode = v.into();
4828 self
4829 }
4830
4831 pub fn set_crf_level<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4833 self.crf_level = v.into();
4834 self
4835 }
4836
4837 pub fn set_allow_open_gop<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4839 self.allow_open_gop = v.into();
4840 self
4841 }
4842
4843 pub fn set_enable_two_pass<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4845 self.enable_two_pass = v.into();
4846 self
4847 }
4848
4849 pub fn set_vbv_size_bits<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4851 self.vbv_size_bits = v.into();
4852 self
4853 }
4854
4855 pub fn set_vbv_fullness_bits<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4857 self.vbv_fullness_bits = v.into();
4858 self
4859 }
4860
4861 pub fn set_b_pyramid<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4863 self.b_pyramid = v.into();
4864 self
4865 }
4866
4867 pub fn set_b_frame_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4869 self.b_frame_count = v.into();
4870 self
4871 }
4872
4873 pub fn set_aq_strength<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
4875 self.aq_strength = v.into();
4876 self
4877 }
4878
4879 pub fn set_profile<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4881 self.profile = v.into();
4882 self
4883 }
4884
4885 pub fn set_tune<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4887 self.tune = v.into();
4888 self
4889 }
4890
4891 pub fn set_preset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4893 self.preset = v.into();
4894 self
4895 }
4896
4897 pub fn set_gop_mode<
4902 T: std::convert::Into<
4903 std::option::Option<crate::model::video_stream::h_265_codec_settings::GopMode>,
4904 >,
4905 >(
4906 mut self,
4907 v: T,
4908 ) -> Self {
4909 self.gop_mode = v.into();
4910 self
4911 }
4912
4913 pub fn gop_frame_count(&self) -> std::option::Option<&i32> {
4917 #[allow(unreachable_patterns)]
4918 self.gop_mode.as_ref().and_then(|v| match v {
4919 crate::model::video_stream::h_265_codec_settings::GopMode::GopFrameCount(v) => {
4920 std::option::Option::Some(v)
4921 }
4922 _ => std::option::Option::None,
4923 })
4924 }
4925
4926 pub fn set_gop_frame_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4932 self.gop_mode = std::option::Option::Some(
4933 crate::model::video_stream::h_265_codec_settings::GopMode::GopFrameCount(v.into()),
4934 );
4935 self
4936 }
4937
4938 pub fn gop_duration(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
4942 #[allow(unreachable_patterns)]
4943 self.gop_mode.as_ref().and_then(|v| match v {
4944 crate::model::video_stream::h_265_codec_settings::GopMode::GopDuration(v) => {
4945 std::option::Option::Some(v)
4946 }
4947 _ => std::option::Option::None,
4948 })
4949 }
4950
4951 pub fn set_gop_duration<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
4957 mut self,
4958 v: T,
4959 ) -> Self {
4960 self.gop_mode = std::option::Option::Some(
4961 crate::model::video_stream::h_265_codec_settings::GopMode::GopDuration(v.into()),
4962 );
4963 self
4964 }
4965
4966 pub fn set_color_format<
4971 T: std::convert::Into<
4972 std::option::Option<
4973 crate::model::video_stream::h_265_codec_settings::ColorFormat,
4974 >,
4975 >,
4976 >(
4977 mut self,
4978 v: T,
4979 ) -> Self {
4980 self.color_format = v.into();
4981 self
4982 }
4983
4984 pub fn sdr(
4988 &self,
4989 ) -> std::option::Option<&std::boxed::Box<crate::model::video_stream::H265ColorFormatSDR>>
4990 {
4991 #[allow(unreachable_patterns)]
4992 self.color_format.as_ref().and_then(|v| match v {
4993 crate::model::video_stream::h_265_codec_settings::ColorFormat::Sdr(v) => {
4994 std::option::Option::Some(v)
4995 }
4996 _ => std::option::Option::None,
4997 })
4998 }
4999
5000 pub fn set_sdr<
5006 T: std::convert::Into<std::boxed::Box<crate::model::video_stream::H265ColorFormatSDR>>,
5007 >(
5008 mut self,
5009 v: T,
5010 ) -> Self {
5011 self.color_format = std::option::Option::Some(
5012 crate::model::video_stream::h_265_codec_settings::ColorFormat::Sdr(v.into()),
5013 );
5014 self
5015 }
5016
5017 pub fn hlg(
5021 &self,
5022 ) -> std::option::Option<&std::boxed::Box<crate::model::video_stream::H265ColorFormatHLG>>
5023 {
5024 #[allow(unreachable_patterns)]
5025 self.color_format.as_ref().and_then(|v| match v {
5026 crate::model::video_stream::h_265_codec_settings::ColorFormat::Hlg(v) => {
5027 std::option::Option::Some(v)
5028 }
5029 _ => std::option::Option::None,
5030 })
5031 }
5032
5033 pub fn set_hlg<
5039 T: std::convert::Into<std::boxed::Box<crate::model::video_stream::H265ColorFormatHLG>>,
5040 >(
5041 mut self,
5042 v: T,
5043 ) -> Self {
5044 self.color_format = std::option::Option::Some(
5045 crate::model::video_stream::h_265_codec_settings::ColorFormat::Hlg(v.into()),
5046 );
5047 self
5048 }
5049
5050 pub fn hdr10(
5054 &self,
5055 ) -> std::option::Option<&std::boxed::Box<crate::model::video_stream::H265ColorFormatHDR10>>
5056 {
5057 #[allow(unreachable_patterns)]
5058 self.color_format.as_ref().and_then(|v| match v {
5059 crate::model::video_stream::h_265_codec_settings::ColorFormat::Hdr10(v) => {
5060 std::option::Option::Some(v)
5061 }
5062 _ => std::option::Option::None,
5063 })
5064 }
5065
5066 pub fn set_hdr10<
5072 T: std::convert::Into<std::boxed::Box<crate::model::video_stream::H265ColorFormatHDR10>>,
5073 >(
5074 mut self,
5075 v: T,
5076 ) -> Self {
5077 self.color_format = std::option::Option::Some(
5078 crate::model::video_stream::h_265_codec_settings::ColorFormat::Hdr10(v.into()),
5079 );
5080 self
5081 }
5082 }
5083
5084 impl wkt::message::Message for H265CodecSettings {
5085 fn typename() -> &'static str {
5086 "type.googleapis.com/google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings"
5087 }
5088 }
5089
5090 pub mod h_265_codec_settings {
5092 #[allow(unused_imports)]
5093 use super::*;
5094
5095 #[derive(Clone, Debug, PartialEq)]
5097 #[non_exhaustive]
5098 pub enum GopMode {
5099 GopFrameCount(i32),
5102 GopDuration(std::boxed::Box<wkt::Duration>),
5108 }
5109
5110 #[derive(Clone, Debug, PartialEq)]
5112 #[non_exhaustive]
5113 pub enum ColorFormat {
5114 Sdr(std::boxed::Box<crate::model::video_stream::H265ColorFormatSDR>),
5116 Hlg(std::boxed::Box<crate::model::video_stream::H265ColorFormatHLG>),
5118 Hdr10(std::boxed::Box<crate::model::video_stream::H265ColorFormatHDR10>),
5120 }
5121 }
5122
5123 #[derive(Clone, Default, PartialEq)]
5125 #[non_exhaustive]
5126 pub struct Vp9ColorFormatSDR {
5127 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5128 }
5129
5130 impl Vp9ColorFormatSDR {
5131 pub fn new() -> Self {
5132 std::default::Default::default()
5133 }
5134 }
5135
5136 impl wkt::message::Message for Vp9ColorFormatSDR {
5137 fn typename() -> &'static str {
5138 "type.googleapis.com/google.cloud.video.transcoder.v1.VideoStream.Vp9ColorFormatSDR"
5139 }
5140 }
5141
5142 #[derive(Clone, Default, PartialEq)]
5144 #[non_exhaustive]
5145 pub struct Vp9ColorFormatHLG {
5146 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5147 }
5148
5149 impl Vp9ColorFormatHLG {
5150 pub fn new() -> Self {
5151 std::default::Default::default()
5152 }
5153 }
5154
5155 impl wkt::message::Message for Vp9ColorFormatHLG {
5156 fn typename() -> &'static str {
5157 "type.googleapis.com/google.cloud.video.transcoder.v1.VideoStream.Vp9ColorFormatHLG"
5158 }
5159 }
5160
5161 #[derive(Clone, Default, PartialEq)]
5163 #[non_exhaustive]
5164 pub struct Vp9CodecSettings {
5165 pub width_pixels: i32,
5174
5175 pub height_pixels: i32,
5184
5185 pub frame_rate: f64,
5188
5189 pub frame_rate_conversion_strategy: crate::model::video_stream::FrameRateConversionStrategy,
5192
5193 pub bitrate_bps: i32,
5196
5197 pub pixel_format: std::string::String,
5211
5212 pub rate_control_mode: std::string::String,
5218
5219 pub crf_level: i32,
5224
5225 pub profile: std::string::String,
5239
5240 pub gop_mode: std::option::Option<crate::model::video_stream::vp_9_codec_settings::GopMode>,
5242
5243 pub color_format:
5245 std::option::Option<crate::model::video_stream::vp_9_codec_settings::ColorFormat>,
5246
5247 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5248 }
5249
5250 impl Vp9CodecSettings {
5251 pub fn new() -> Self {
5252 std::default::Default::default()
5253 }
5254
5255 pub fn set_width_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5257 self.width_pixels = v.into();
5258 self
5259 }
5260
5261 pub fn set_height_pixels<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5263 self.height_pixels = v.into();
5264 self
5265 }
5266
5267 pub fn set_frame_rate<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
5269 self.frame_rate = v.into();
5270 self
5271 }
5272
5273 pub fn set_frame_rate_conversion_strategy<
5275 T: std::convert::Into<crate::model::video_stream::FrameRateConversionStrategy>,
5276 >(
5277 mut self,
5278 v: T,
5279 ) -> Self {
5280 self.frame_rate_conversion_strategy = v.into();
5281 self
5282 }
5283
5284 pub fn set_bitrate_bps<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5286 self.bitrate_bps = v.into();
5287 self
5288 }
5289
5290 pub fn set_pixel_format<T: std::convert::Into<std::string::String>>(
5292 mut self,
5293 v: T,
5294 ) -> Self {
5295 self.pixel_format = v.into();
5296 self
5297 }
5298
5299 pub fn set_rate_control_mode<T: std::convert::Into<std::string::String>>(
5301 mut self,
5302 v: T,
5303 ) -> Self {
5304 self.rate_control_mode = v.into();
5305 self
5306 }
5307
5308 pub fn set_crf_level<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5310 self.crf_level = v.into();
5311 self
5312 }
5313
5314 pub fn set_profile<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5316 self.profile = v.into();
5317 self
5318 }
5319
5320 pub fn set_gop_mode<
5325 T: std::convert::Into<
5326 std::option::Option<crate::model::video_stream::vp_9_codec_settings::GopMode>,
5327 >,
5328 >(
5329 mut self,
5330 v: T,
5331 ) -> Self {
5332 self.gop_mode = v.into();
5333 self
5334 }
5335
5336 pub fn gop_frame_count(&self) -> std::option::Option<&i32> {
5340 #[allow(unreachable_patterns)]
5341 self.gop_mode.as_ref().and_then(|v| match v {
5342 crate::model::video_stream::vp_9_codec_settings::GopMode::GopFrameCount(v) => {
5343 std::option::Option::Some(v)
5344 }
5345 _ => std::option::Option::None,
5346 })
5347 }
5348
5349 pub fn set_gop_frame_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5355 self.gop_mode = std::option::Option::Some(
5356 crate::model::video_stream::vp_9_codec_settings::GopMode::GopFrameCount(v.into()),
5357 );
5358 self
5359 }
5360
5361 pub fn gop_duration(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
5365 #[allow(unreachable_patterns)]
5366 self.gop_mode.as_ref().and_then(|v| match v {
5367 crate::model::video_stream::vp_9_codec_settings::GopMode::GopDuration(v) => {
5368 std::option::Option::Some(v)
5369 }
5370 _ => std::option::Option::None,
5371 })
5372 }
5373
5374 pub fn set_gop_duration<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
5380 mut self,
5381 v: T,
5382 ) -> Self {
5383 self.gop_mode = std::option::Option::Some(
5384 crate::model::video_stream::vp_9_codec_settings::GopMode::GopDuration(v.into()),
5385 );
5386 self
5387 }
5388
5389 pub fn set_color_format<
5394 T: std::convert::Into<
5395 std::option::Option<
5396 crate::model::video_stream::vp_9_codec_settings::ColorFormat,
5397 >,
5398 >,
5399 >(
5400 mut self,
5401 v: T,
5402 ) -> Self {
5403 self.color_format = v.into();
5404 self
5405 }
5406
5407 pub fn sdr(
5411 &self,
5412 ) -> std::option::Option<&std::boxed::Box<crate::model::video_stream::Vp9ColorFormatSDR>>
5413 {
5414 #[allow(unreachable_patterns)]
5415 self.color_format.as_ref().and_then(|v| match v {
5416 crate::model::video_stream::vp_9_codec_settings::ColorFormat::Sdr(v) => {
5417 std::option::Option::Some(v)
5418 }
5419 _ => std::option::Option::None,
5420 })
5421 }
5422
5423 pub fn set_sdr<
5429 T: std::convert::Into<std::boxed::Box<crate::model::video_stream::Vp9ColorFormatSDR>>,
5430 >(
5431 mut self,
5432 v: T,
5433 ) -> Self {
5434 self.color_format = std::option::Option::Some(
5435 crate::model::video_stream::vp_9_codec_settings::ColorFormat::Sdr(v.into()),
5436 );
5437 self
5438 }
5439
5440 pub fn hlg(
5444 &self,
5445 ) -> std::option::Option<&std::boxed::Box<crate::model::video_stream::Vp9ColorFormatHLG>>
5446 {
5447 #[allow(unreachable_patterns)]
5448 self.color_format.as_ref().and_then(|v| match v {
5449 crate::model::video_stream::vp_9_codec_settings::ColorFormat::Hlg(v) => {
5450 std::option::Option::Some(v)
5451 }
5452 _ => std::option::Option::None,
5453 })
5454 }
5455
5456 pub fn set_hlg<
5462 T: std::convert::Into<std::boxed::Box<crate::model::video_stream::Vp9ColorFormatHLG>>,
5463 >(
5464 mut self,
5465 v: T,
5466 ) -> Self {
5467 self.color_format = std::option::Option::Some(
5468 crate::model::video_stream::vp_9_codec_settings::ColorFormat::Hlg(v.into()),
5469 );
5470 self
5471 }
5472 }
5473
5474 impl wkt::message::Message for Vp9CodecSettings {
5475 fn typename() -> &'static str {
5476 "type.googleapis.com/google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings"
5477 }
5478 }
5479
5480 pub mod vp_9_codec_settings {
5482 #[allow(unused_imports)]
5483 use super::*;
5484
5485 #[derive(Clone, Debug, PartialEq)]
5487 #[non_exhaustive]
5488 pub enum GopMode {
5489 GopFrameCount(i32),
5492 GopDuration(std::boxed::Box<wkt::Duration>),
5498 }
5499
5500 #[derive(Clone, Debug, PartialEq)]
5502 #[non_exhaustive]
5503 pub enum ColorFormat {
5504 Sdr(std::boxed::Box<crate::model::video_stream::Vp9ColorFormatSDR>),
5506 Hlg(std::boxed::Box<crate::model::video_stream::Vp9ColorFormatHLG>),
5508 }
5509 }
5510
5511 #[derive(Clone, Debug, PartialEq)]
5527 #[non_exhaustive]
5528 pub enum FrameRateConversionStrategy {
5529 Unspecified,
5531 Downsample,
5540 DropDuplicate,
5542 UnknownValue(frame_rate_conversion_strategy::UnknownValue),
5547 }
5548
5549 #[doc(hidden)]
5550 pub mod frame_rate_conversion_strategy {
5551 #[allow(unused_imports)]
5552 use super::*;
5553 #[derive(Clone, Debug, PartialEq)]
5554 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5555 }
5556
5557 impl FrameRateConversionStrategy {
5558 pub fn value(&self) -> std::option::Option<i32> {
5563 match self {
5564 Self::Unspecified => std::option::Option::Some(0),
5565 Self::Downsample => std::option::Option::Some(1),
5566 Self::DropDuplicate => std::option::Option::Some(2),
5567 Self::UnknownValue(u) => u.0.value(),
5568 }
5569 }
5570
5571 pub fn name(&self) -> std::option::Option<&str> {
5576 match self {
5577 Self::Unspecified => {
5578 std::option::Option::Some("FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED")
5579 }
5580 Self::Downsample => std::option::Option::Some("DOWNSAMPLE"),
5581 Self::DropDuplicate => std::option::Option::Some("DROP_DUPLICATE"),
5582 Self::UnknownValue(u) => u.0.name(),
5583 }
5584 }
5585 }
5586
5587 impl std::default::Default for FrameRateConversionStrategy {
5588 fn default() -> Self {
5589 use std::convert::From;
5590 Self::from(0)
5591 }
5592 }
5593
5594 impl std::fmt::Display for FrameRateConversionStrategy {
5595 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5596 wkt::internal::display_enum(f, self.name(), self.value())
5597 }
5598 }
5599
5600 impl std::convert::From<i32> for FrameRateConversionStrategy {
5601 fn from(value: i32) -> Self {
5602 match value {
5603 0 => Self::Unspecified,
5604 1 => Self::Downsample,
5605 2 => Self::DropDuplicate,
5606 _ => Self::UnknownValue(frame_rate_conversion_strategy::UnknownValue(
5607 wkt::internal::UnknownEnumValue::Integer(value),
5608 )),
5609 }
5610 }
5611 }
5612
5613 impl std::convert::From<&str> for FrameRateConversionStrategy {
5614 fn from(value: &str) -> Self {
5615 use std::string::ToString;
5616 match value {
5617 "FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED" => Self::Unspecified,
5618 "DOWNSAMPLE" => Self::Downsample,
5619 "DROP_DUPLICATE" => Self::DropDuplicate,
5620 _ => Self::UnknownValue(frame_rate_conversion_strategy::UnknownValue(
5621 wkt::internal::UnknownEnumValue::String(value.to_string()),
5622 )),
5623 }
5624 }
5625 }
5626
5627 impl serde::ser::Serialize for FrameRateConversionStrategy {
5628 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5629 where
5630 S: serde::Serializer,
5631 {
5632 match self {
5633 Self::Unspecified => serializer.serialize_i32(0),
5634 Self::Downsample => serializer.serialize_i32(1),
5635 Self::DropDuplicate => serializer.serialize_i32(2),
5636 Self::UnknownValue(u) => u.0.serialize(serializer),
5637 }
5638 }
5639 }
5640
5641 impl<'de> serde::de::Deserialize<'de> for FrameRateConversionStrategy {
5642 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5643 where
5644 D: serde::Deserializer<'de>,
5645 {
5646 deserializer.deserialize_any(
5647 wkt::internal::EnumVisitor::<FrameRateConversionStrategy>::new(
5648 ".google.cloud.video.transcoder.v1.VideoStream.FrameRateConversionStrategy",
5649 ),
5650 )
5651 }
5652 }
5653
5654 #[derive(Clone, Debug, PartialEq)]
5656 #[non_exhaustive]
5657 pub enum CodecSettings {
5658 H264(std::boxed::Box<crate::model::video_stream::H264CodecSettings>),
5660 H265(std::boxed::Box<crate::model::video_stream::H265CodecSettings>),
5662 Vp9(std::boxed::Box<crate::model::video_stream::Vp9CodecSettings>),
5664 }
5665}
5666
5667#[derive(Clone, Default, PartialEq)]
5669#[non_exhaustive]
5670pub struct AudioStream {
5671 pub codec: std::string::String,
5683
5684 pub bitrate_bps: i32,
5687
5688 pub channel_count: i32,
5690
5691 pub channel_layout: std::vec::Vec<std::string::String>,
5704
5705 pub mapping: std::vec::Vec<crate::model::audio_stream::AudioMapping>,
5713
5714 pub sample_rate_hertz: i32,
5716
5717 pub language_code: std::string::String,
5722
5723 pub display_name: std::string::String,
5726
5727 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5728}
5729
5730impl AudioStream {
5731 pub fn new() -> Self {
5732 std::default::Default::default()
5733 }
5734
5735 pub fn set_codec<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5737 self.codec = v.into();
5738 self
5739 }
5740
5741 pub fn set_bitrate_bps<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5743 self.bitrate_bps = v.into();
5744 self
5745 }
5746
5747 pub fn set_channel_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5749 self.channel_count = v.into();
5750 self
5751 }
5752
5753 pub fn set_channel_layout<T, V>(mut self, v: T) -> Self
5755 where
5756 T: std::iter::IntoIterator<Item = V>,
5757 V: std::convert::Into<std::string::String>,
5758 {
5759 use std::iter::Iterator;
5760 self.channel_layout = v.into_iter().map(|i| i.into()).collect();
5761 self
5762 }
5763
5764 pub fn set_mapping<T, V>(mut self, v: T) -> Self
5766 where
5767 T: std::iter::IntoIterator<Item = V>,
5768 V: std::convert::Into<crate::model::audio_stream::AudioMapping>,
5769 {
5770 use std::iter::Iterator;
5771 self.mapping = v.into_iter().map(|i| i.into()).collect();
5772 self
5773 }
5774
5775 pub fn set_sample_rate_hertz<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5777 self.sample_rate_hertz = v.into();
5778 self
5779 }
5780
5781 pub fn set_language_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5783 self.language_code = v.into();
5784 self
5785 }
5786
5787 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5789 self.display_name = v.into();
5790 self
5791 }
5792}
5793
5794impl wkt::message::Message for AudioStream {
5795 fn typename() -> &'static str {
5796 "type.googleapis.com/google.cloud.video.transcoder.v1.AudioStream"
5797 }
5798}
5799
5800pub mod audio_stream {
5802 #[allow(unused_imports)]
5803 use super::*;
5804
5805 #[derive(Clone, Default, PartialEq)]
5813 #[non_exhaustive]
5814 pub struct AudioMapping {
5815 pub atom_key: std::string::String,
5823
5824 pub input_key: std::string::String,
5829
5830 pub input_track: i32,
5832
5833 pub input_channel: i32,
5835
5836 pub output_channel: i32,
5838
5839 pub gain_db: f64,
5842
5843 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5844 }
5845
5846 impl AudioMapping {
5847 pub fn new() -> Self {
5848 std::default::Default::default()
5849 }
5850
5851 pub fn set_atom_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5853 self.atom_key = v.into();
5854 self
5855 }
5856
5857 pub fn set_input_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5859 self.input_key = v.into();
5860 self
5861 }
5862
5863 pub fn set_input_track<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5865 self.input_track = v.into();
5866 self
5867 }
5868
5869 pub fn set_input_channel<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5871 self.input_channel = v.into();
5872 self
5873 }
5874
5875 pub fn set_output_channel<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5877 self.output_channel = v.into();
5878 self
5879 }
5880
5881 pub fn set_gain_db<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
5883 self.gain_db = v.into();
5884 self
5885 }
5886 }
5887
5888 impl wkt::message::Message for AudioMapping {
5889 fn typename() -> &'static str {
5890 "type.googleapis.com/google.cloud.video.transcoder.v1.AudioStream.AudioMapping"
5891 }
5892 }
5893}
5894
5895#[derive(Clone, Default, PartialEq)]
5897#[non_exhaustive]
5898pub struct TextStream {
5899 pub codec: std::string::String,
5909
5910 pub language_code: std::string::String,
5915
5916 pub mapping: std::vec::Vec<crate::model::text_stream::TextMapping>,
5924
5925 pub display_name: std::string::String,
5928
5929 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5930}
5931
5932impl TextStream {
5933 pub fn new() -> Self {
5934 std::default::Default::default()
5935 }
5936
5937 pub fn set_codec<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5939 self.codec = v.into();
5940 self
5941 }
5942
5943 pub fn set_language_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5945 self.language_code = v.into();
5946 self
5947 }
5948
5949 pub fn set_mapping<T, V>(mut self, v: T) -> Self
5951 where
5952 T: std::iter::IntoIterator<Item = V>,
5953 V: std::convert::Into<crate::model::text_stream::TextMapping>,
5954 {
5955 use std::iter::Iterator;
5956 self.mapping = v.into_iter().map(|i| i.into()).collect();
5957 self
5958 }
5959
5960 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5962 self.display_name = v.into();
5963 self
5964 }
5965}
5966
5967impl wkt::message::Message for TextStream {
5968 fn typename() -> &'static str {
5969 "type.googleapis.com/google.cloud.video.transcoder.v1.TextStream"
5970 }
5971}
5972
5973pub mod text_stream {
5975 #[allow(unused_imports)]
5976 use super::*;
5977
5978 #[derive(Clone, Default, PartialEq)]
5986 #[non_exhaustive]
5987 pub struct TextMapping {
5988 pub atom_key: std::string::String,
5996
5997 pub input_key: std::string::String,
6002
6003 pub input_track: i32,
6005
6006 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6007 }
6008
6009 impl TextMapping {
6010 pub fn new() -> Self {
6011 std::default::Default::default()
6012 }
6013
6014 pub fn set_atom_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6016 self.atom_key = v.into();
6017 self
6018 }
6019
6020 pub fn set_input_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6022 self.input_key = v.into();
6023 self
6024 }
6025
6026 pub fn set_input_track<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6028 self.input_track = v.into();
6029 self
6030 }
6031 }
6032
6033 impl wkt::message::Message for TextMapping {
6034 fn typename() -> &'static str {
6035 "type.googleapis.com/google.cloud.video.transcoder.v1.TextStream.TextMapping"
6036 }
6037 }
6038}
6039
6040#[derive(Clone, Default, PartialEq)]
6042#[non_exhaustive]
6043pub struct SegmentSettings {
6044 pub segment_duration: std::option::Option<wkt::Duration>,
6049
6050 pub individual_segments: bool,
6052
6053 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6054}
6055
6056impl SegmentSettings {
6057 pub fn new() -> Self {
6058 std::default::Default::default()
6059 }
6060
6061 pub fn set_segment_duration<T>(mut self, v: T) -> Self
6063 where
6064 T: std::convert::Into<wkt::Duration>,
6065 {
6066 self.segment_duration = std::option::Option::Some(v.into());
6067 self
6068 }
6069
6070 pub fn set_or_clear_segment_duration<T>(mut self, v: std::option::Option<T>) -> Self
6072 where
6073 T: std::convert::Into<wkt::Duration>,
6074 {
6075 self.segment_duration = v.map(|x| x.into());
6076 self
6077 }
6078
6079 pub fn set_individual_segments<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6081 self.individual_segments = v.into();
6082 self
6083 }
6084}
6085
6086impl wkt::message::Message for SegmentSettings {
6087 fn typename() -> &'static str {
6088 "type.googleapis.com/google.cloud.video.transcoder.v1.SegmentSettings"
6089 }
6090}
6091
6092#[derive(Clone, Default, PartialEq)]
6094#[non_exhaustive]
6095pub struct Encryption {
6096 pub id: std::string::String,
6098
6099 pub drm_systems: std::option::Option<crate::model::encryption::DrmSystems>,
6102
6103 pub encryption_mode: std::option::Option<crate::model::encryption::EncryptionMode>,
6105
6106 pub secret_source: std::option::Option<crate::model::encryption::SecretSource>,
6108
6109 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6110}
6111
6112impl Encryption {
6113 pub fn new() -> Self {
6114 std::default::Default::default()
6115 }
6116
6117 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6119 self.id = v.into();
6120 self
6121 }
6122
6123 pub fn set_drm_systems<T>(mut self, v: T) -> Self
6125 where
6126 T: std::convert::Into<crate::model::encryption::DrmSystems>,
6127 {
6128 self.drm_systems = std::option::Option::Some(v.into());
6129 self
6130 }
6131
6132 pub fn set_or_clear_drm_systems<T>(mut self, v: std::option::Option<T>) -> Self
6134 where
6135 T: std::convert::Into<crate::model::encryption::DrmSystems>,
6136 {
6137 self.drm_systems = v.map(|x| x.into());
6138 self
6139 }
6140
6141 pub fn set_encryption_mode<
6146 T: std::convert::Into<std::option::Option<crate::model::encryption::EncryptionMode>>,
6147 >(
6148 mut self,
6149 v: T,
6150 ) -> Self {
6151 self.encryption_mode = v.into();
6152 self
6153 }
6154
6155 pub fn aes_128(
6159 &self,
6160 ) -> std::option::Option<&std::boxed::Box<crate::model::encryption::Aes128Encryption>> {
6161 #[allow(unreachable_patterns)]
6162 self.encryption_mode.as_ref().and_then(|v| match v {
6163 crate::model::encryption::EncryptionMode::Aes128(v) => std::option::Option::Some(v),
6164 _ => std::option::Option::None,
6165 })
6166 }
6167
6168 pub fn set_aes_128<
6174 T: std::convert::Into<std::boxed::Box<crate::model::encryption::Aes128Encryption>>,
6175 >(
6176 mut self,
6177 v: T,
6178 ) -> Self {
6179 self.encryption_mode =
6180 std::option::Option::Some(crate::model::encryption::EncryptionMode::Aes128(v.into()));
6181 self
6182 }
6183
6184 pub fn sample_aes(
6188 &self,
6189 ) -> std::option::Option<&std::boxed::Box<crate::model::encryption::SampleAesEncryption>> {
6190 #[allow(unreachable_patterns)]
6191 self.encryption_mode.as_ref().and_then(|v| match v {
6192 crate::model::encryption::EncryptionMode::SampleAes(v) => std::option::Option::Some(v),
6193 _ => std::option::Option::None,
6194 })
6195 }
6196
6197 pub fn set_sample_aes<
6203 T: std::convert::Into<std::boxed::Box<crate::model::encryption::SampleAesEncryption>>,
6204 >(
6205 mut self,
6206 v: T,
6207 ) -> Self {
6208 self.encryption_mode = std::option::Option::Some(
6209 crate::model::encryption::EncryptionMode::SampleAes(v.into()),
6210 );
6211 self
6212 }
6213
6214 pub fn mpeg_cenc(
6218 &self,
6219 ) -> std::option::Option<&std::boxed::Box<crate::model::encryption::MpegCommonEncryption>> {
6220 #[allow(unreachable_patterns)]
6221 self.encryption_mode.as_ref().and_then(|v| match v {
6222 crate::model::encryption::EncryptionMode::MpegCenc(v) => std::option::Option::Some(v),
6223 _ => std::option::Option::None,
6224 })
6225 }
6226
6227 pub fn set_mpeg_cenc<
6233 T: std::convert::Into<std::boxed::Box<crate::model::encryption::MpegCommonEncryption>>,
6234 >(
6235 mut self,
6236 v: T,
6237 ) -> Self {
6238 self.encryption_mode =
6239 std::option::Option::Some(crate::model::encryption::EncryptionMode::MpegCenc(v.into()));
6240 self
6241 }
6242
6243 pub fn set_secret_source<
6248 T: std::convert::Into<std::option::Option<crate::model::encryption::SecretSource>>,
6249 >(
6250 mut self,
6251 v: T,
6252 ) -> Self {
6253 self.secret_source = v.into();
6254 self
6255 }
6256
6257 pub fn secret_manager_key_source(
6261 &self,
6262 ) -> std::option::Option<&std::boxed::Box<crate::model::encryption::SecretManagerSource>> {
6263 #[allow(unreachable_patterns)]
6264 self.secret_source.as_ref().and_then(|v| match v {
6265 crate::model::encryption::SecretSource::SecretManagerKeySource(v) => {
6266 std::option::Option::Some(v)
6267 }
6268 _ => std::option::Option::None,
6269 })
6270 }
6271
6272 pub fn set_secret_manager_key_source<
6278 T: std::convert::Into<std::boxed::Box<crate::model::encryption::SecretManagerSource>>,
6279 >(
6280 mut self,
6281 v: T,
6282 ) -> Self {
6283 self.secret_source = std::option::Option::Some(
6284 crate::model::encryption::SecretSource::SecretManagerKeySource(v.into()),
6285 );
6286 self
6287 }
6288}
6289
6290impl wkt::message::Message for Encryption {
6291 fn typename() -> &'static str {
6292 "type.googleapis.com/google.cloud.video.transcoder.v1.Encryption"
6293 }
6294}
6295
6296pub mod encryption {
6298 #[allow(unused_imports)]
6299 use super::*;
6300
6301 #[derive(Clone, Default, PartialEq)]
6303 #[non_exhaustive]
6304 pub struct Aes128Encryption {
6305 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6306 }
6307
6308 impl Aes128Encryption {
6309 pub fn new() -> Self {
6310 std::default::Default::default()
6311 }
6312 }
6313
6314 impl wkt::message::Message for Aes128Encryption {
6315 fn typename() -> &'static str {
6316 "type.googleapis.com/google.cloud.video.transcoder.v1.Encryption.Aes128Encryption"
6317 }
6318 }
6319
6320 #[derive(Clone, Default, PartialEq)]
6322 #[non_exhaustive]
6323 pub struct SampleAesEncryption {
6324 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6325 }
6326
6327 impl SampleAesEncryption {
6328 pub fn new() -> Self {
6329 std::default::Default::default()
6330 }
6331 }
6332
6333 impl wkt::message::Message for SampleAesEncryption {
6334 fn typename() -> &'static str {
6335 "type.googleapis.com/google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption"
6336 }
6337 }
6338
6339 #[derive(Clone, Default, PartialEq)]
6341 #[non_exhaustive]
6342 pub struct MpegCommonEncryption {
6343 pub scheme: std::string::String,
6350
6351 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6352 }
6353
6354 impl MpegCommonEncryption {
6355 pub fn new() -> Self {
6356 std::default::Default::default()
6357 }
6358
6359 pub fn set_scheme<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6361 self.scheme = v.into();
6362 self
6363 }
6364 }
6365
6366 impl wkt::message::Message for MpegCommonEncryption {
6367 fn typename() -> &'static str {
6368 "type.googleapis.com/google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption"
6369 }
6370 }
6371
6372 #[derive(Clone, Default, PartialEq)]
6374 #[non_exhaustive]
6375 pub struct SecretManagerSource {
6376 pub secret_version: std::string::String,
6383
6384 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6385 }
6386
6387 impl SecretManagerSource {
6388 pub fn new() -> Self {
6389 std::default::Default::default()
6390 }
6391
6392 pub fn set_secret_version<T: std::convert::Into<std::string::String>>(
6394 mut self,
6395 v: T,
6396 ) -> Self {
6397 self.secret_version = v.into();
6398 self
6399 }
6400 }
6401
6402 impl wkt::message::Message for SecretManagerSource {
6403 fn typename() -> &'static str {
6404 "type.googleapis.com/google.cloud.video.transcoder.v1.Encryption.SecretManagerSource"
6405 }
6406 }
6407
6408 #[derive(Clone, Default, PartialEq)]
6410 #[non_exhaustive]
6411 pub struct Widevine {
6412 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6413 }
6414
6415 impl Widevine {
6416 pub fn new() -> Self {
6417 std::default::Default::default()
6418 }
6419 }
6420
6421 impl wkt::message::Message for Widevine {
6422 fn typename() -> &'static str {
6423 "type.googleapis.com/google.cloud.video.transcoder.v1.Encryption.Widevine"
6424 }
6425 }
6426
6427 #[derive(Clone, Default, PartialEq)]
6429 #[non_exhaustive]
6430 pub struct Fairplay {
6431 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6432 }
6433
6434 impl Fairplay {
6435 pub fn new() -> Self {
6436 std::default::Default::default()
6437 }
6438 }
6439
6440 impl wkt::message::Message for Fairplay {
6441 fn typename() -> &'static str {
6442 "type.googleapis.com/google.cloud.video.transcoder.v1.Encryption.Fairplay"
6443 }
6444 }
6445
6446 #[derive(Clone, Default, PartialEq)]
6448 #[non_exhaustive]
6449 pub struct Playready {
6450 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6451 }
6452
6453 impl Playready {
6454 pub fn new() -> Self {
6455 std::default::Default::default()
6456 }
6457 }
6458
6459 impl wkt::message::Message for Playready {
6460 fn typename() -> &'static str {
6461 "type.googleapis.com/google.cloud.video.transcoder.v1.Encryption.Playready"
6462 }
6463 }
6464
6465 #[derive(Clone, Default, PartialEq)]
6467 #[non_exhaustive]
6468 pub struct Clearkey {
6469 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6470 }
6471
6472 impl Clearkey {
6473 pub fn new() -> Self {
6474 std::default::Default::default()
6475 }
6476 }
6477
6478 impl wkt::message::Message for Clearkey {
6479 fn typename() -> &'static str {
6480 "type.googleapis.com/google.cloud.video.transcoder.v1.Encryption.Clearkey"
6481 }
6482 }
6483
6484 #[derive(Clone, Default, PartialEq)]
6486 #[non_exhaustive]
6487 pub struct DrmSystems {
6488 pub widevine: std::option::Option<crate::model::encryption::Widevine>,
6490
6491 pub fairplay: std::option::Option<crate::model::encryption::Fairplay>,
6493
6494 pub playready: std::option::Option<crate::model::encryption::Playready>,
6496
6497 pub clearkey: std::option::Option<crate::model::encryption::Clearkey>,
6499
6500 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6501 }
6502
6503 impl DrmSystems {
6504 pub fn new() -> Self {
6505 std::default::Default::default()
6506 }
6507
6508 pub fn set_widevine<T>(mut self, v: T) -> Self
6510 where
6511 T: std::convert::Into<crate::model::encryption::Widevine>,
6512 {
6513 self.widevine = std::option::Option::Some(v.into());
6514 self
6515 }
6516
6517 pub fn set_or_clear_widevine<T>(mut self, v: std::option::Option<T>) -> Self
6519 where
6520 T: std::convert::Into<crate::model::encryption::Widevine>,
6521 {
6522 self.widevine = v.map(|x| x.into());
6523 self
6524 }
6525
6526 pub fn set_fairplay<T>(mut self, v: T) -> Self
6528 where
6529 T: std::convert::Into<crate::model::encryption::Fairplay>,
6530 {
6531 self.fairplay = std::option::Option::Some(v.into());
6532 self
6533 }
6534
6535 pub fn set_or_clear_fairplay<T>(mut self, v: std::option::Option<T>) -> Self
6537 where
6538 T: std::convert::Into<crate::model::encryption::Fairplay>,
6539 {
6540 self.fairplay = v.map(|x| x.into());
6541 self
6542 }
6543
6544 pub fn set_playready<T>(mut self, v: T) -> Self
6546 where
6547 T: std::convert::Into<crate::model::encryption::Playready>,
6548 {
6549 self.playready = std::option::Option::Some(v.into());
6550 self
6551 }
6552
6553 pub fn set_or_clear_playready<T>(mut self, v: std::option::Option<T>) -> Self
6555 where
6556 T: std::convert::Into<crate::model::encryption::Playready>,
6557 {
6558 self.playready = v.map(|x| x.into());
6559 self
6560 }
6561
6562 pub fn set_clearkey<T>(mut self, v: T) -> Self
6564 where
6565 T: std::convert::Into<crate::model::encryption::Clearkey>,
6566 {
6567 self.clearkey = std::option::Option::Some(v.into());
6568 self
6569 }
6570
6571 pub fn set_or_clear_clearkey<T>(mut self, v: std::option::Option<T>) -> Self
6573 where
6574 T: std::convert::Into<crate::model::encryption::Clearkey>,
6575 {
6576 self.clearkey = v.map(|x| x.into());
6577 self
6578 }
6579 }
6580
6581 impl wkt::message::Message for DrmSystems {
6582 fn typename() -> &'static str {
6583 "type.googleapis.com/google.cloud.video.transcoder.v1.Encryption.DrmSystems"
6584 }
6585 }
6586
6587 #[derive(Clone, Debug, PartialEq)]
6589 #[non_exhaustive]
6590 pub enum EncryptionMode {
6591 Aes128(std::boxed::Box<crate::model::encryption::Aes128Encryption>),
6593 SampleAes(std::boxed::Box<crate::model::encryption::SampleAesEncryption>),
6595 MpegCenc(std::boxed::Box<crate::model::encryption::MpegCommonEncryption>),
6597 }
6598
6599 #[derive(Clone, Debug, PartialEq)]
6601 #[non_exhaustive]
6602 pub enum SecretSource {
6603 SecretManagerKeySource(std::boxed::Box<crate::model::encryption::SecretManagerSource>),
6605 }
6606}
6607
6608#[derive(Clone, Default, PartialEq)]
6610#[non_exhaustive]
6611pub struct CreateJobRequest {
6612 pub parent: std::string::String,
6615
6616 pub job: std::option::Option<crate::model::Job>,
6618
6619 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6620}
6621
6622impl CreateJobRequest {
6623 pub fn new() -> Self {
6624 std::default::Default::default()
6625 }
6626
6627 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6629 self.parent = v.into();
6630 self
6631 }
6632
6633 pub fn set_job<T>(mut self, v: T) -> Self
6635 where
6636 T: std::convert::Into<crate::model::Job>,
6637 {
6638 self.job = std::option::Option::Some(v.into());
6639 self
6640 }
6641
6642 pub fn set_or_clear_job<T>(mut self, v: std::option::Option<T>) -> Self
6644 where
6645 T: std::convert::Into<crate::model::Job>,
6646 {
6647 self.job = v.map(|x| x.into());
6648 self
6649 }
6650}
6651
6652impl wkt::message::Message for CreateJobRequest {
6653 fn typename() -> &'static str {
6654 "type.googleapis.com/google.cloud.video.transcoder.v1.CreateJobRequest"
6655 }
6656}
6657
6658#[derive(Clone, Default, PartialEq)]
6661#[non_exhaustive]
6662pub struct ListJobsRequest {
6663 pub parent: std::string::String,
6665
6666 pub page_size: i32,
6668
6669 pub page_token: std::string::String,
6672
6673 pub filter: std::string::String,
6676
6677 pub order_by: std::string::String,
6680
6681 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6682}
6683
6684impl ListJobsRequest {
6685 pub fn new() -> Self {
6686 std::default::Default::default()
6687 }
6688
6689 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6691 self.parent = v.into();
6692 self
6693 }
6694
6695 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6697 self.page_size = v.into();
6698 self
6699 }
6700
6701 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6703 self.page_token = v.into();
6704 self
6705 }
6706
6707 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6709 self.filter = v.into();
6710 self
6711 }
6712
6713 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6715 self.order_by = v.into();
6716 self
6717 }
6718}
6719
6720impl wkt::message::Message for ListJobsRequest {
6721 fn typename() -> &'static str {
6722 "type.googleapis.com/google.cloud.video.transcoder.v1.ListJobsRequest"
6723 }
6724}
6725
6726#[derive(Clone, Default, PartialEq)]
6728#[non_exhaustive]
6729pub struct GetJobRequest {
6730 pub name: std::string::String,
6733
6734 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6735}
6736
6737impl GetJobRequest {
6738 pub fn new() -> Self {
6739 std::default::Default::default()
6740 }
6741
6742 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6744 self.name = v.into();
6745 self
6746 }
6747}
6748
6749impl wkt::message::Message for GetJobRequest {
6750 fn typename() -> &'static str {
6751 "type.googleapis.com/google.cloud.video.transcoder.v1.GetJobRequest"
6752 }
6753}
6754
6755#[derive(Clone, Default, PartialEq)]
6757#[non_exhaustive]
6758pub struct DeleteJobRequest {
6759 pub name: std::string::String,
6762
6763 pub allow_missing: bool,
6766
6767 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6768}
6769
6770impl DeleteJobRequest {
6771 pub fn new() -> Self {
6772 std::default::Default::default()
6773 }
6774
6775 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6777 self.name = v.into();
6778 self
6779 }
6780
6781 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6783 self.allow_missing = v.into();
6784 self
6785 }
6786}
6787
6788impl wkt::message::Message for DeleteJobRequest {
6789 fn typename() -> &'static str {
6790 "type.googleapis.com/google.cloud.video.transcoder.v1.DeleteJobRequest"
6791 }
6792}
6793
6794#[derive(Clone, Default, PartialEq)]
6796#[non_exhaustive]
6797pub struct ListJobsResponse {
6798 pub jobs: std::vec::Vec<crate::model::Job>,
6800
6801 pub next_page_token: std::string::String,
6803
6804 pub unreachable: std::vec::Vec<std::string::String>,
6806
6807 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6808}
6809
6810impl ListJobsResponse {
6811 pub fn new() -> Self {
6812 std::default::Default::default()
6813 }
6814
6815 pub fn set_jobs<T, V>(mut self, v: T) -> Self
6817 where
6818 T: std::iter::IntoIterator<Item = V>,
6819 V: std::convert::Into<crate::model::Job>,
6820 {
6821 use std::iter::Iterator;
6822 self.jobs = v.into_iter().map(|i| i.into()).collect();
6823 self
6824 }
6825
6826 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6828 self.next_page_token = v.into();
6829 self
6830 }
6831
6832 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6834 where
6835 T: std::iter::IntoIterator<Item = V>,
6836 V: std::convert::Into<std::string::String>,
6837 {
6838 use std::iter::Iterator;
6839 self.unreachable = v.into_iter().map(|i| i.into()).collect();
6840 self
6841 }
6842}
6843
6844impl wkt::message::Message for ListJobsResponse {
6845 fn typename() -> &'static str {
6846 "type.googleapis.com/google.cloud.video.transcoder.v1.ListJobsResponse"
6847 }
6848}
6849
6850#[doc(hidden)]
6851impl gax::paginator::internal::PageableResponse for ListJobsResponse {
6852 type PageItem = crate::model::Job;
6853
6854 fn items(self) -> std::vec::Vec<Self::PageItem> {
6855 self.jobs
6856 }
6857
6858 fn next_page_token(&self) -> std::string::String {
6859 use std::clone::Clone;
6860 self.next_page_token.clone()
6861 }
6862}
6863
6864#[derive(Clone, Default, PartialEq)]
6866#[non_exhaustive]
6867pub struct CreateJobTemplateRequest {
6868 pub parent: std::string::String,
6871
6872 pub job_template: std::option::Option<crate::model::JobTemplate>,
6874
6875 pub job_template_id: std::string::String,
6881
6882 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6883}
6884
6885impl CreateJobTemplateRequest {
6886 pub fn new() -> Self {
6887 std::default::Default::default()
6888 }
6889
6890 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6892 self.parent = v.into();
6893 self
6894 }
6895
6896 pub fn set_job_template<T>(mut self, v: T) -> Self
6898 where
6899 T: std::convert::Into<crate::model::JobTemplate>,
6900 {
6901 self.job_template = std::option::Option::Some(v.into());
6902 self
6903 }
6904
6905 pub fn set_or_clear_job_template<T>(mut self, v: std::option::Option<T>) -> Self
6907 where
6908 T: std::convert::Into<crate::model::JobTemplate>,
6909 {
6910 self.job_template = v.map(|x| x.into());
6911 self
6912 }
6913
6914 pub fn set_job_template_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6916 self.job_template_id = v.into();
6917 self
6918 }
6919}
6920
6921impl wkt::message::Message for CreateJobTemplateRequest {
6922 fn typename() -> &'static str {
6923 "type.googleapis.com/google.cloud.video.transcoder.v1.CreateJobTemplateRequest"
6924 }
6925}
6926
6927#[derive(Clone, Default, PartialEq)]
6929#[non_exhaustive]
6930pub struct ListJobTemplatesRequest {
6931 pub parent: std::string::String,
6934
6935 pub page_size: i32,
6937
6938 pub page_token: std::string::String,
6941
6942 pub filter: std::string::String,
6945
6946 pub order_by: std::string::String,
6949
6950 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6951}
6952
6953impl ListJobTemplatesRequest {
6954 pub fn new() -> Self {
6955 std::default::Default::default()
6956 }
6957
6958 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6960 self.parent = v.into();
6961 self
6962 }
6963
6964 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6966 self.page_size = v.into();
6967 self
6968 }
6969
6970 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6972 self.page_token = v.into();
6973 self
6974 }
6975
6976 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6978 self.filter = v.into();
6979 self
6980 }
6981
6982 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6984 self.order_by = v.into();
6985 self
6986 }
6987}
6988
6989impl wkt::message::Message for ListJobTemplatesRequest {
6990 fn typename() -> &'static str {
6991 "type.googleapis.com/google.cloud.video.transcoder.v1.ListJobTemplatesRequest"
6992 }
6993}
6994
6995#[derive(Clone, Default, PartialEq)]
6997#[non_exhaustive]
6998pub struct GetJobTemplateRequest {
6999 pub name: std::string::String,
7003
7004 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7005}
7006
7007impl GetJobTemplateRequest {
7008 pub fn new() -> Self {
7009 std::default::Default::default()
7010 }
7011
7012 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7014 self.name = v.into();
7015 self
7016 }
7017}
7018
7019impl wkt::message::Message for GetJobTemplateRequest {
7020 fn typename() -> &'static str {
7021 "type.googleapis.com/google.cloud.video.transcoder.v1.GetJobTemplateRequest"
7022 }
7023}
7024
7025#[derive(Clone, Default, PartialEq)]
7027#[non_exhaustive]
7028pub struct DeleteJobTemplateRequest {
7029 pub name: std::string::String,
7032
7033 pub allow_missing: bool,
7036
7037 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7038}
7039
7040impl DeleteJobTemplateRequest {
7041 pub fn new() -> Self {
7042 std::default::Default::default()
7043 }
7044
7045 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7047 self.name = v.into();
7048 self
7049 }
7050
7051 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7053 self.allow_missing = v.into();
7054 self
7055 }
7056}
7057
7058impl wkt::message::Message for DeleteJobTemplateRequest {
7059 fn typename() -> &'static str {
7060 "type.googleapis.com/google.cloud.video.transcoder.v1.DeleteJobTemplateRequest"
7061 }
7062}
7063
7064#[derive(Clone, Default, PartialEq)]
7066#[non_exhaustive]
7067pub struct ListJobTemplatesResponse {
7068 pub job_templates: std::vec::Vec<crate::model::JobTemplate>,
7070
7071 pub next_page_token: std::string::String,
7073
7074 pub unreachable: std::vec::Vec<std::string::String>,
7076
7077 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7078}
7079
7080impl ListJobTemplatesResponse {
7081 pub fn new() -> Self {
7082 std::default::Default::default()
7083 }
7084
7085 pub fn set_job_templates<T, V>(mut self, v: T) -> Self
7087 where
7088 T: std::iter::IntoIterator<Item = V>,
7089 V: std::convert::Into<crate::model::JobTemplate>,
7090 {
7091 use std::iter::Iterator;
7092 self.job_templates = v.into_iter().map(|i| i.into()).collect();
7093 self
7094 }
7095
7096 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7098 self.next_page_token = v.into();
7099 self
7100 }
7101
7102 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
7104 where
7105 T: std::iter::IntoIterator<Item = V>,
7106 V: std::convert::Into<std::string::String>,
7107 {
7108 use std::iter::Iterator;
7109 self.unreachable = v.into_iter().map(|i| i.into()).collect();
7110 self
7111 }
7112}
7113
7114impl wkt::message::Message for ListJobTemplatesResponse {
7115 fn typename() -> &'static str {
7116 "type.googleapis.com/google.cloud.video.transcoder.v1.ListJobTemplatesResponse"
7117 }
7118}
7119
7120#[doc(hidden)]
7121impl gax::paginator::internal::PageableResponse for ListJobTemplatesResponse {
7122 type PageItem = crate::model::JobTemplate;
7123
7124 fn items(self) -> std::vec::Vec<Self::PageItem> {
7125 self.job_templates
7126 }
7127
7128 fn next_page_token(&self) -> std::string::String {
7129 use std::clone::Clone;
7130 self.next_page_token.clone()
7131 }
7132}