Struct aws_sdk_ec2::model::tag::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for Tag
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn key(self, input: impl Into<String>) -> Self
pub fn key(self, input: impl Into<String>) -> Self
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:
.
sourcepub fn set_key(self, input: Option<String>) -> Self
pub fn set_key(self, input: Option<String>) -> Self
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:
.
Examples found in repository?
src/xml_deser.rs (line 40094)
40077 40078 40079 40080 40081 40082 40083 40084 40085 40086 40087 40088 40089 40090 40091 40092 40093 40094 40095 40096 40097 40098 40099 40100 40101 40102 40103 40104 40105 40106 40107 40108 40109 40110 40111 40112 40113 40114
pub fn deser_structure_crate_model_tag(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Tag, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Tag::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("key") /* Key com.amazonaws.ec2#Tag$Key */ => {
let var_1710 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_1710);
}
,
s if s.matches("value") /* Value com.amazonaws.ec2#Tag$Value */ => {
let var_1711 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_1711);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn value(self, input: impl Into<String>) -> Self
pub fn value(self, input: impl Into<String>) -> Self
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.
sourcepub fn set_value(self, input: Option<String>) -> Self
pub fn set_value(self, input: Option<String>) -> Self
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.
Examples found in repository?
src/xml_deser.rs (line 40107)
40077 40078 40079 40080 40081 40082 40083 40084 40085 40086 40087 40088 40089 40090 40091 40092 40093 40094 40095 40096 40097 40098 40099 40100 40101 40102 40103 40104 40105 40106 40107 40108 40109 40110 40111 40112 40113 40114
pub fn deser_structure_crate_model_tag(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Tag, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Tag::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("key") /* Key com.amazonaws.ec2#Tag$Key */ => {
let var_1710 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_1710);
}
,
s if s.matches("value") /* Value com.amazonaws.ec2#Tag$Value */ => {
let var_1711 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_1711);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> Tag
pub fn build(self) -> Tag
Consumes the builder and constructs a Tag
.
Examples found in repository?
src/xml_deser.rs (line 40113)
40077 40078 40079 40080 40081 40082 40083 40084 40085 40086 40087 40088 40089 40090 40091 40092 40093 40094 40095 40096 40097 40098 40099 40100 40101 40102 40103 40104 40105 40106 40107 40108 40109 40110 40111 40112 40113 40114
pub fn deser_structure_crate_model_tag(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Tag, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Tag::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("key") /* Key com.amazonaws.ec2#Tag$Key */ => {
let var_1710 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_1710);
}
,
s if s.matches("value") /* Value com.amazonaws.ec2#Tag$Value */ => {
let var_1711 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_1711);
}
,
_ => {}
}
}
Ok(builder.build())
}