#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateRegistryOutput {
pub registry_arn: ::std::string::String,
_request_id: Option<String>,
}
impl CreateRegistryOutput {
pub fn registry_arn(&self) -> &str {
use std::ops::Deref;
self.registry_arn.deref()
}
}
impl ::aws_types::request_id::RequestId for CreateRegistryOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateRegistryOutput {
pub fn builder() -> crate::operation::create_registry::builders::CreateRegistryOutputBuilder {
crate::operation::create_registry::builders::CreateRegistryOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateRegistryOutputBuilder {
pub(crate) registry_arn: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateRegistryOutputBuilder {
pub fn registry_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.registry_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_registry_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.registry_arn = input;
self
}
pub fn get_registry_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.registry_arn
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_registry::CreateRegistryOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_registry::CreateRegistryOutput {
registry_arn: self.registry_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"registry_arn",
"registry_arn was not specified but it is required when building CreateRegistryOutput",
)
})?,
_request_id: self._request_id,
})
}
}