#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateEntitlementOutput {
pub entitlements: ::std::option::Option<::std::vec::Vec<crate::types::VmEntitlement>>,
_request_id: Option<String>,
}
impl CreateEntitlementOutput {
pub fn entitlements(&self) -> &[crate::types::VmEntitlement] {
self.entitlements.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for CreateEntitlementOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateEntitlementOutput {
pub fn builder() -> crate::operation::create_entitlement::builders::CreateEntitlementOutputBuilder {
crate::operation::create_entitlement::builders::CreateEntitlementOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateEntitlementOutputBuilder {
pub(crate) entitlements: ::std::option::Option<::std::vec::Vec<crate::types::VmEntitlement>>,
_request_id: Option<String>,
}
impl CreateEntitlementOutputBuilder {
pub fn entitlements(mut self, input: crate::types::VmEntitlement) -> Self {
let mut v = self.entitlements.unwrap_or_default();
v.push(input);
self.entitlements = ::std::option::Option::Some(v);
self
}
pub fn set_entitlements(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VmEntitlement>>) -> Self {
self.entitlements = input;
self
}
pub fn get_entitlements(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VmEntitlement>> {
&self.entitlements
}
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) -> crate::operation::create_entitlement::CreateEntitlementOutput {
crate::operation::create_entitlement::CreateEntitlementOutput {
entitlements: self.entitlements,
_request_id: self._request_id,
}
}
}