#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct MobileDeviceAccessRule {
pub mobile_device_access_rule_id: ::std::option::Option<::std::string::String>,
pub name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub effect: ::std::option::Option<crate::types::MobileDeviceAccessRuleEffect>,
pub device_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub not_device_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub device_models: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub not_device_models: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub device_operating_systems: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub not_device_operating_systems: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub device_user_agents: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub not_device_user_agents: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub date_created: ::std::option::Option<::aws_smithy_types::DateTime>,
pub date_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl MobileDeviceAccessRule {
pub fn mobile_device_access_rule_id(&self) -> ::std::option::Option<&str> {
self.mobile_device_access_rule_id.as_deref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn effect(&self) -> ::std::option::Option<&crate::types::MobileDeviceAccessRuleEffect> {
self.effect.as_ref()
}
pub fn device_types(&self) -> &[::std::string::String] {
self.device_types.as_deref().unwrap_or_default()
}
pub fn not_device_types(&self) -> &[::std::string::String] {
self.not_device_types.as_deref().unwrap_or_default()
}
pub fn device_models(&self) -> &[::std::string::String] {
self.device_models.as_deref().unwrap_or_default()
}
pub fn not_device_models(&self) -> &[::std::string::String] {
self.not_device_models.as_deref().unwrap_or_default()
}
pub fn device_operating_systems(&self) -> &[::std::string::String] {
self.device_operating_systems.as_deref().unwrap_or_default()
}
pub fn not_device_operating_systems(&self) -> &[::std::string::String] {
self.not_device_operating_systems.as_deref().unwrap_or_default()
}
pub fn device_user_agents(&self) -> &[::std::string::String] {
self.device_user_agents.as_deref().unwrap_or_default()
}
pub fn not_device_user_agents(&self) -> &[::std::string::String] {
self.not_device_user_agents.as_deref().unwrap_or_default()
}
pub fn date_created(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.date_created.as_ref()
}
pub fn date_modified(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.date_modified.as_ref()
}
}
impl MobileDeviceAccessRule {
pub fn builder() -> crate::types::builders::MobileDeviceAccessRuleBuilder {
crate::types::builders::MobileDeviceAccessRuleBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct MobileDeviceAccessRuleBuilder {
pub(crate) mobile_device_access_rule_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) effect: ::std::option::Option<crate::types::MobileDeviceAccessRuleEffect>,
pub(crate) device_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) not_device_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) device_models: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) not_device_models: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) device_operating_systems: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) not_device_operating_systems: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) device_user_agents: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) not_device_user_agents: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) date_created: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) date_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl MobileDeviceAccessRuleBuilder {
pub fn mobile_device_access_rule_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.mobile_device_access_rule_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_mobile_device_access_rule_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.mobile_device_access_rule_id = input;
self
}
pub fn get_mobile_device_access_rule_id(&self) -> &::std::option::Option<::std::string::String> {
&self.mobile_device_access_rule_id
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn effect(mut self, input: crate::types::MobileDeviceAccessRuleEffect) -> Self {
self.effect = ::std::option::Option::Some(input);
self
}
pub fn set_effect(mut self, input: ::std::option::Option<crate::types::MobileDeviceAccessRuleEffect>) -> Self {
self.effect = input;
self
}
pub fn get_effect(&self) -> &::std::option::Option<crate::types::MobileDeviceAccessRuleEffect> {
&self.effect
}
pub fn device_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.device_types.unwrap_or_default();
v.push(input.into());
self.device_types = ::std::option::Option::Some(v);
self
}
pub fn set_device_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.device_types = input;
self
}
pub fn get_device_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.device_types
}
pub fn not_device_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.not_device_types.unwrap_or_default();
v.push(input.into());
self.not_device_types = ::std::option::Option::Some(v);
self
}
pub fn set_not_device_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.not_device_types = input;
self
}
pub fn get_not_device_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.not_device_types
}
pub fn device_models(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.device_models.unwrap_or_default();
v.push(input.into());
self.device_models = ::std::option::Option::Some(v);
self
}
pub fn set_device_models(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.device_models = input;
self
}
pub fn get_device_models(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.device_models
}
pub fn not_device_models(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.not_device_models.unwrap_or_default();
v.push(input.into());
self.not_device_models = ::std::option::Option::Some(v);
self
}
pub fn set_not_device_models(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.not_device_models = input;
self
}
pub fn get_not_device_models(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.not_device_models
}
pub fn device_operating_systems(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.device_operating_systems.unwrap_or_default();
v.push(input.into());
self.device_operating_systems = ::std::option::Option::Some(v);
self
}
pub fn set_device_operating_systems(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.device_operating_systems = input;
self
}
pub fn get_device_operating_systems(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.device_operating_systems
}
pub fn not_device_operating_systems(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.not_device_operating_systems.unwrap_or_default();
v.push(input.into());
self.not_device_operating_systems = ::std::option::Option::Some(v);
self
}
pub fn set_not_device_operating_systems(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.not_device_operating_systems = input;
self
}
pub fn get_not_device_operating_systems(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.not_device_operating_systems
}
pub fn device_user_agents(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.device_user_agents.unwrap_or_default();
v.push(input.into());
self.device_user_agents = ::std::option::Option::Some(v);
self
}
pub fn set_device_user_agents(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.device_user_agents = input;
self
}
pub fn get_device_user_agents(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.device_user_agents
}
pub fn not_device_user_agents(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.not_device_user_agents.unwrap_or_default();
v.push(input.into());
self.not_device_user_agents = ::std::option::Option::Some(v);
self
}
pub fn set_not_device_user_agents(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.not_device_user_agents = input;
self
}
pub fn get_not_device_user_agents(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.not_device_user_agents
}
pub fn date_created(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.date_created = ::std::option::Option::Some(input);
self
}
pub fn set_date_created(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.date_created = input;
self
}
pub fn get_date_created(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.date_created
}
pub fn date_modified(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.date_modified = ::std::option::Option::Some(input);
self
}
pub fn set_date_modified(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.date_modified = input;
self
}
pub fn get_date_modified(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.date_modified
}
pub fn build(self) -> crate::types::MobileDeviceAccessRule {
crate::types::MobileDeviceAccessRule {
mobile_device_access_rule_id: self.mobile_device_access_rule_id,
name: self.name,
description: self.description,
effect: self.effect,
device_types: self.device_types,
not_device_types: self.not_device_types,
device_models: self.device_models,
not_device_models: self.not_device_models,
device_operating_systems: self.device_operating_systems,
not_device_operating_systems: self.not_device_operating_systems,
device_user_agents: self.device_user_agents,
not_device_user_agents: self.not_device_user_agents,
date_created: self.date_created,
date_modified: self.date_modified,
}
}
}