#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Capabilities {
pub supported_authentication_types: ::std::vec::Vec<crate::types::AuthenticationType>,
pub supported_data_operations: ::std::vec::Vec<crate::types::DataOperation>,
pub supported_compute_environments: ::std::vec::Vec<crate::types::ComputeEnvironment>,
}
impl Capabilities {
pub fn supported_authentication_types(&self) -> &[crate::types::AuthenticationType] {
use std::ops::Deref;
self.supported_authentication_types.deref()
}
pub fn supported_data_operations(&self) -> &[crate::types::DataOperation] {
use std::ops::Deref;
self.supported_data_operations.deref()
}
pub fn supported_compute_environments(&self) -> &[crate::types::ComputeEnvironment] {
use std::ops::Deref;
self.supported_compute_environments.deref()
}
}
impl Capabilities {
pub fn builder() -> crate::types::builders::CapabilitiesBuilder {
crate::types::builders::CapabilitiesBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CapabilitiesBuilder {
pub(crate) supported_authentication_types: ::std::option::Option<::std::vec::Vec<crate::types::AuthenticationType>>,
pub(crate) supported_data_operations: ::std::option::Option<::std::vec::Vec<crate::types::DataOperation>>,
pub(crate) supported_compute_environments: ::std::option::Option<::std::vec::Vec<crate::types::ComputeEnvironment>>,
}
impl CapabilitiesBuilder {
pub fn supported_authentication_types(mut self, input: crate::types::AuthenticationType) -> Self {
let mut v = self.supported_authentication_types.unwrap_or_default();
v.push(input);
self.supported_authentication_types = ::std::option::Option::Some(v);
self
}
pub fn set_supported_authentication_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AuthenticationType>>) -> Self {
self.supported_authentication_types = input;
self
}
pub fn get_supported_authentication_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AuthenticationType>> {
&self.supported_authentication_types
}
pub fn supported_data_operations(mut self, input: crate::types::DataOperation) -> Self {
let mut v = self.supported_data_operations.unwrap_or_default();
v.push(input);
self.supported_data_operations = ::std::option::Option::Some(v);
self
}
pub fn set_supported_data_operations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataOperation>>) -> Self {
self.supported_data_operations = input;
self
}
pub fn get_supported_data_operations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataOperation>> {
&self.supported_data_operations
}
pub fn supported_compute_environments(mut self, input: crate::types::ComputeEnvironment) -> Self {
let mut v = self.supported_compute_environments.unwrap_or_default();
v.push(input);
self.supported_compute_environments = ::std::option::Option::Some(v);
self
}
pub fn set_supported_compute_environments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ComputeEnvironment>>) -> Self {
self.supported_compute_environments = input;
self
}
pub fn get_supported_compute_environments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ComputeEnvironment>> {
&self.supported_compute_environments
}
pub fn build(self) -> ::std::result::Result<crate::types::Capabilities, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Capabilities {
supported_authentication_types: self.supported_authentication_types.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"supported_authentication_types",
"supported_authentication_types was not specified but it is required when building Capabilities",
)
})?,
supported_data_operations: self.supported_data_operations.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"supported_data_operations",
"supported_data_operations was not specified but it is required when building Capabilities",
)
})?,
supported_compute_environments: self.supported_compute_environments.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"supported_compute_environments",
"supported_compute_environments was not specified but it is required when building Capabilities",
)
})?,
})
}
}