Skip to main content

aws_sdk_pinpointemail/types/
_isp_placement.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>An object that describes how email sent during the predictive inbox placement test was handled by a certain email provider.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct IspPlacement {
7    /// <p>The name of the email provider that the inbox placement data applies to.</p>
8    pub isp_name: ::std::option::Option<::std::string::String>,
9    /// <p>An object that contains inbox placement metrics for a specific email provider.</p>
10    pub placement_statistics: ::std::option::Option<crate::types::PlacementStatistics>,
11}
12impl IspPlacement {
13    /// <p>The name of the email provider that the inbox placement data applies to.</p>
14    pub fn isp_name(&self) -> ::std::option::Option<&str> {
15        self.isp_name.as_deref()
16    }
17    /// <p>An object that contains inbox placement metrics for a specific email provider.</p>
18    pub fn placement_statistics(&self) -> ::std::option::Option<&crate::types::PlacementStatistics> {
19        self.placement_statistics.as_ref()
20    }
21}
22impl IspPlacement {
23    /// Creates a new builder-style object to manufacture [`IspPlacement`](crate::types::IspPlacement).
24    pub fn builder() -> crate::types::builders::IspPlacementBuilder {
25        crate::types::builders::IspPlacementBuilder::default()
26    }
27}
28
29/// A builder for [`IspPlacement`](crate::types::IspPlacement).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct IspPlacementBuilder {
33    pub(crate) isp_name: ::std::option::Option<::std::string::String>,
34    pub(crate) placement_statistics: ::std::option::Option<crate::types::PlacementStatistics>,
35}
36impl IspPlacementBuilder {
37    /// <p>The name of the email provider that the inbox placement data applies to.</p>
38    pub fn isp_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.isp_name = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The name of the email provider that the inbox placement data applies to.</p>
43    pub fn set_isp_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.isp_name = input;
45        self
46    }
47    /// <p>The name of the email provider that the inbox placement data applies to.</p>
48    pub fn get_isp_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.isp_name
50    }
51    /// <p>An object that contains inbox placement metrics for a specific email provider.</p>
52    pub fn placement_statistics(mut self, input: crate::types::PlacementStatistics) -> Self {
53        self.placement_statistics = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>An object that contains inbox placement metrics for a specific email provider.</p>
57    pub fn set_placement_statistics(mut self, input: ::std::option::Option<crate::types::PlacementStatistics>) -> Self {
58        self.placement_statistics = input;
59        self
60    }
61    /// <p>An object that contains inbox placement metrics for a specific email provider.</p>
62    pub fn get_placement_statistics(&self) -> &::std::option::Option<crate::types::PlacementStatistics> {
63        &self.placement_statistics
64    }
65    /// Consumes the builder and constructs a [`IspPlacement`](crate::types::IspPlacement).
66    pub fn build(self) -> crate::types::IspPlacement {
67        crate::types::IspPlacement {
68            isp_name: self.isp_name,
69            placement_statistics: self.placement_statistics,
70        }
71    }
72}