Struct aws_sdk_workspacesweb::output::create_portal_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for CreatePortalOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn portal_arn(self, input: impl Into<String>) -> Self
pub fn portal_arn(self, input: impl Into<String>) -> Self
The ARN of the web portal.
sourcepub fn set_portal_arn(self, input: Option<String>) -> Self
pub fn set_portal_arn(self, input: Option<String>) -> Self
The ARN of the web portal.
Examples found in repository?
src/json_deser.rs (lines 874-880)
856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912
pub(crate) fn deser_operation_crate_operation_create_portal(
value: &[u8],
mut builder: crate::output::create_portal_output::Builder,
) -> Result<
crate::output::create_portal_output::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"portalArn" => {
builder = builder.set_portal_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"portalEndpoint" => {
builder = builder.set_portal_endpoint(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}
sourcepub fn portal_endpoint(self, input: impl Into<String>) -> Self
pub fn portal_endpoint(self, input: impl Into<String>) -> Self
The endpoint URL of the web portal that users access in order to start streaming sessions.
sourcepub fn set_portal_endpoint(self, input: Option<String>) -> Self
pub fn set_portal_endpoint(self, input: Option<String>) -> Self
The endpoint URL of the web portal that users access in order to start streaming sessions.
Examples found in repository?
src/json_deser.rs (lines 883-889)
856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912
pub(crate) fn deser_operation_crate_operation_create_portal(
value: &[u8],
mut builder: crate::output::create_portal_output::Builder,
) -> Result<
crate::output::create_portal_output::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"portalArn" => {
builder = builder.set_portal_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"portalEndpoint" => {
builder = builder.set_portal_endpoint(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}
sourcepub fn build(self) -> CreatePortalOutput
pub fn build(self) -> CreatePortalOutput
Consumes the builder and constructs a CreatePortalOutput
.
Examples found in repository?
src/operation_deser.rs (line 1256)
1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258
pub fn parse_create_portal_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::CreatePortalOutput, crate::error::CreatePortalError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::create_portal_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_create_portal(
response.body().as_ref(),
output,
)
.map_err(crate::error::CreatePortalError::unhandled)?;
output.build()
})
}