#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateCachePolicyOutput {
pub cache_policy: ::std::option::Option<crate::types::CachePolicy>,
pub location: ::std::option::Option<::std::string::String>,
pub e_tag: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateCachePolicyOutput {
pub fn cache_policy(&self) -> ::std::option::Option<&crate::types::CachePolicy> {
self.cache_policy.as_ref()
}
pub fn location(&self) -> ::std::option::Option<&str> {
self.location.as_deref()
}
pub fn e_tag(&self) -> ::std::option::Option<&str> {
self.e_tag.as_deref()
}
}
impl ::aws_types::request_id::RequestId for CreateCachePolicyOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateCachePolicyOutput {
pub fn builder() -> crate::operation::create_cache_policy::builders::CreateCachePolicyOutputBuilder {
crate::operation::create_cache_policy::builders::CreateCachePolicyOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateCachePolicyOutputBuilder {
pub(crate) cache_policy: ::std::option::Option<crate::types::CachePolicy>,
pub(crate) location: ::std::option::Option<::std::string::String>,
pub(crate) e_tag: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateCachePolicyOutputBuilder {
pub fn cache_policy(mut self, input: crate::types::CachePolicy) -> Self {
self.cache_policy = ::std::option::Option::Some(input);
self
}
pub fn set_cache_policy(mut self, input: ::std::option::Option<crate::types::CachePolicy>) -> Self {
self.cache_policy = input;
self
}
pub fn get_cache_policy(&self) -> &::std::option::Option<crate::types::CachePolicy> {
&self.cache_policy
}
pub fn location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.location = ::std::option::Option::Some(input.into());
self
}
pub fn set_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.location = input;
self
}
pub fn get_location(&self) -> &::std::option::Option<::std::string::String> {
&self.location
}
pub fn e_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.e_tag = ::std::option::Option::Some(input.into());
self
}
pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.e_tag = input;
self
}
pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
&self.e_tag
}
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_cache_policy::CreateCachePolicyOutput {
crate::operation::create_cache_policy::CreateCachePolicyOutput {
cache_policy: self.cache_policy,
location: self.location,
e_tag: self.e_tag,
_request_id: self._request_id,
}
}
}