1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// A request to create a SdiSource.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSdiSourceInput {
/// Applies only if the type is QUAD. Specify the mode for handling the quad-link signal: QUADRANT or INTERLEAVE.
pub mode: ::std::option::Option<crate::types::SdiSourceMode>,
/// Specify a name that is unique in the AWS account. We recommend you assign a name that describes the source, for example curling-cameraA. Names are case-sensitive.
pub name: ::std::option::Option<::std::string::String>,
/// An ID that you assign to a create request. This ID ensures idempotency when creating resources.
pub request_id: ::std::option::Option<::std::string::String>,
/// A collection of key-value pairs.
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// Specify the type of the SDI source: SINGLE: The source is a single-link source. QUAD: The source is one part of a quad-link source.
pub r#type: ::std::option::Option<crate::types::SdiSourceType>,
}
impl CreateSdiSourceInput {
/// Applies only if the type is QUAD. Specify the mode for handling the quad-link signal: QUADRANT or INTERLEAVE.
pub fn mode(&self) -> ::std::option::Option<&crate::types::SdiSourceMode> {
self.mode.as_ref()
}
/// Specify a name that is unique in the AWS account. We recommend you assign a name that describes the source, for example curling-cameraA. Names are case-sensitive.
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// An ID that you assign to a create request. This ID ensures idempotency when creating resources.
pub fn request_id(&self) -> ::std::option::Option<&str> {
self.request_id.as_deref()
}
/// A collection of key-value pairs.
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
/// Specify the type of the SDI source: SINGLE: The source is a single-link source. QUAD: The source is one part of a quad-link source.
pub fn r#type(&self) -> ::std::option::Option<&crate::types::SdiSourceType> {
self.r#type.as_ref()
}
}
impl CreateSdiSourceInput {
/// Creates a new builder-style object to manufacture [`CreateSdiSourceInput`](crate::operation::create_sdi_source::CreateSdiSourceInput).
pub fn builder() -> crate::operation::create_sdi_source::builders::CreateSdiSourceInputBuilder {
crate::operation::create_sdi_source::builders::CreateSdiSourceInputBuilder::default()
}
}
/// A builder for [`CreateSdiSourceInput`](crate::operation::create_sdi_source::CreateSdiSourceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSdiSourceInputBuilder {
pub(crate) mode: ::std::option::Option<crate::types::SdiSourceMode>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) request_id: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) r#type: ::std::option::Option<crate::types::SdiSourceType>,
}
impl CreateSdiSourceInputBuilder {
/// Applies only if the type is QUAD. Specify the mode for handling the quad-link signal: QUADRANT or INTERLEAVE.
pub fn mode(mut self, input: crate::types::SdiSourceMode) -> Self {
self.mode = ::std::option::Option::Some(input);
self
}
/// Applies only if the type is QUAD. Specify the mode for handling the quad-link signal: QUADRANT or INTERLEAVE.
pub fn set_mode(mut self, input: ::std::option::Option<crate::types::SdiSourceMode>) -> Self {
self.mode = input;
self
}
/// Applies only if the type is QUAD. Specify the mode for handling the quad-link signal: QUADRANT or INTERLEAVE.
pub fn get_mode(&self) -> &::std::option::Option<crate::types::SdiSourceMode> {
&self.mode
}
/// Specify a name that is unique in the AWS account. We recommend you assign a name that describes the source, for example curling-cameraA. Names are case-sensitive.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// Specify a name that is unique in the AWS account. We recommend you assign a name that describes the source, for example curling-cameraA. Names are case-sensitive.
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// Specify a name that is unique in the AWS account. We recommend you assign a name that describes the source, for example curling-cameraA. Names are case-sensitive.
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// An ID that you assign to a create request. This ID ensures idempotency when creating resources.
pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.request_id = ::std::option::Option::Some(input.into());
self
}
/// An ID that you assign to a create request. This ID ensures idempotency when creating resources.
pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.request_id = input;
self
}
/// An ID that you assign to a create request. This ID ensures idempotency when creating resources.
pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
&self.request_id
}
/// Adds a key-value pair to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// A collection of key-value pairs.
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
/// A collection of key-value pairs.
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
/// A collection of key-value pairs.
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
/// Specify the type of the SDI source: SINGLE: The source is a single-link source. QUAD: The source is one part of a quad-link source.
pub fn r#type(mut self, input: crate::types::SdiSourceType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// Specify the type of the SDI source: SINGLE: The source is a single-link source. QUAD: The source is one part of a quad-link source.
pub fn set_type(mut self, input: ::std::option::Option<crate::types::SdiSourceType>) -> Self {
self.r#type = input;
self
}
/// Specify the type of the SDI source: SINGLE: The source is a single-link source. QUAD: The source is one part of a quad-link source.
pub fn get_type(&self) -> &::std::option::Option<crate::types::SdiSourceType> {
&self.r#type
}
/// Consumes the builder and constructs a [`CreateSdiSourceInput`](crate::operation::create_sdi_source::CreateSdiSourceInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_sdi_source::CreateSdiSourceInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_sdi_source::CreateSdiSourceInput {
mode: self.mode,
name: self.name,
request_id: self.request_id,
tags: self.tags,
r#type: self.r#type,
})
}
}