#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetConfigInput {
#[allow(missing_docs)] pub workspace_id: ::std::option::Option<::std::string::String>,
#[allow(missing_docs)] pub org_id: ::std::option::Option<::std::string::String>,
#[allow(missing_docs)] pub prefix: ::std::option::Option<::std::vec::Vec::<::std::string::String>>,
#[allow(missing_docs)] pub version: ::std::option::Option<::std::string::String>,
pub context: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>,
}
impl GetConfigInput {
#[allow(missing_docs)] pub fn workspace_id(&self) -> ::std::option::Option<&str> {
self.workspace_id.as_deref()
}
#[allow(missing_docs)] pub fn org_id(&self) -> ::std::option::Option<&str> {
self.org_id.as_deref()
}
#[allow(missing_docs)] pub fn prefix(&self) -> &[::std::string::String] {
self.prefix.as_deref()
.unwrap_or_default()
}
#[allow(missing_docs)] pub fn version(&self) -> ::std::option::Option<&str> {
self.version.as_deref()
}
pub fn context(&self) -> ::std::option::Option<&::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>> {
self.context.as_ref()
}
}
impl GetConfigInput {
pub fn builder() -> crate::operation::get_config::builders::GetConfigInputBuilder {
crate::operation::get_config::builders::GetConfigInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetConfigInputBuilder {
pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
pub(crate) org_id: ::std::option::Option<::std::string::String>,
pub(crate) prefix: ::std::option::Option<::std::vec::Vec::<::std::string::String>>,
pub(crate) version: ::std::option::Option<::std::string::String>,
pub(crate) context: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>,
}
impl GetConfigInputBuilder {
#[allow(missing_docs)] pub fn workspace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.workspace_id = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.workspace_id = input; self
}
#[allow(missing_docs)] pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
&self.workspace_id
}
#[allow(missing_docs)] pub fn org_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.org_id = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_org_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.org_id = input; self
}
#[allow(missing_docs)] pub fn get_org_id(&self) -> &::std::option::Option<::std::string::String> {
&self.org_id
}
pub fn prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.prefix.unwrap_or_default();
v.push(input.into());
self.prefix = ::std::option::Option::Some(v);
self
}
#[allow(missing_docs)] pub fn set_prefix(mut self, input: ::std::option::Option<::std::vec::Vec::<::std::string::String>>) -> Self {
self.prefix = input; self
}
#[allow(missing_docs)] pub fn get_prefix(&self) -> &::std::option::Option<::std::vec::Vec::<::std::string::String>> {
&self.prefix
}
#[allow(missing_docs)] pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.version = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.version = input; self
}
#[allow(missing_docs)] pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
&self.version
}
pub fn context(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::aws_smithy_types::Document) -> Self {
let mut hash_map = self.context.unwrap_or_default();
hash_map.insert(k.into(), v);
self.context = ::std::option::Option::Some(hash_map);
self
}
pub fn set_context(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>) -> Self {
self.context = input; self
}
pub fn get_context(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>> {
&self.context
}
pub fn build(self) -> ::std::result::Result<crate::operation::get_config::GetConfigInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(
crate::operation::get_config::GetConfigInput {
workspace_id: self.workspace_id
,
org_id: self.org_id
,
prefix: self.prefix
,
version: self.version
,
context: self.context
,
}
)
}
}