#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssociateLicenseInput {
pub workspace_id: ::std::option::Option<::std::string::String>,
pub license_type: ::std::option::Option<crate::types::LicenseType>,
}
impl AssociateLicenseInput {
pub fn workspace_id(&self) -> ::std::option::Option<&str> {
self.workspace_id.as_deref()
}
pub fn license_type(&self) -> ::std::option::Option<&crate::types::LicenseType> {
self.license_type.as_ref()
}
}
impl AssociateLicenseInput {
pub fn builder() -> crate::operation::associate_license::builders::AssociateLicenseInputBuilder {
crate::operation::associate_license::builders::AssociateLicenseInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AssociateLicenseInputBuilder {
pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
pub(crate) license_type: ::std::option::Option<crate::types::LicenseType>,
}
impl AssociateLicenseInputBuilder {
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
}
pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.workspace_id = input;
self
}
pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
&self.workspace_id
}
pub fn license_type(mut self, input: crate::types::LicenseType) -> Self {
self.license_type = ::std::option::Option::Some(input);
self
}
pub fn set_license_type(mut self, input: ::std::option::Option<crate::types::LicenseType>) -> Self {
self.license_type = input;
self
}
pub fn get_license_type(&self) -> &::std::option::Option<crate::types::LicenseType> {
&self.license_type
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::associate_license::AssociateLicenseInput, ::aws_smithy_http::operation::error::BuildError> {
::std::result::Result::Ok(crate::operation::associate_license::AssociateLicenseInput {
workspace_id: self.workspace_id,
license_type: self.license_type,
})
}
}