aws_sdk_personalize/operation/describe_campaign/
_describe_campaign_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeCampaignOutput {
6    /// <note>
7    /// <p>The <code>latestCampaignUpdate</code> field is only returned when the campaign has had at least one <code>UpdateCampaign</code> call.</p>
8    /// </note>
9    /// <p>The properties of the campaign.</p><note>
10    /// <p>The <code>latestCampaignUpdate</code> field is only returned when the campaign has had at least one <code>UpdateCampaign</code> call.</p>
11    /// </note>
12    pub campaign: ::std::option::Option<crate::types::Campaign>,
13    _request_id: Option<String>,
14}
15impl DescribeCampaignOutput {
16    /// <note>
17    /// <p>The <code>latestCampaignUpdate</code> field is only returned when the campaign has had at least one <code>UpdateCampaign</code> call.</p>
18    /// </note>
19    /// <p>The properties of the campaign.</p><note>
20    /// <p>The <code>latestCampaignUpdate</code> field is only returned when the campaign has had at least one <code>UpdateCampaign</code> call.</p>
21    /// </note>
22    pub fn campaign(&self) -> ::std::option::Option<&crate::types::Campaign> {
23        self.campaign.as_ref()
24    }
25}
26impl ::aws_types::request_id::RequestId for DescribeCampaignOutput {
27    fn request_id(&self) -> Option<&str> {
28        self._request_id.as_deref()
29    }
30}
31impl DescribeCampaignOutput {
32    /// Creates a new builder-style object to manufacture [`DescribeCampaignOutput`](crate::operation::describe_campaign::DescribeCampaignOutput).
33    pub fn builder() -> crate::operation::describe_campaign::builders::DescribeCampaignOutputBuilder {
34        crate::operation::describe_campaign::builders::DescribeCampaignOutputBuilder::default()
35    }
36}
37
38/// A builder for [`DescribeCampaignOutput`](crate::operation::describe_campaign::DescribeCampaignOutput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct DescribeCampaignOutputBuilder {
42    pub(crate) campaign: ::std::option::Option<crate::types::Campaign>,
43    _request_id: Option<String>,
44}
45impl DescribeCampaignOutputBuilder {
46    /// <note>
47    /// <p>The <code>latestCampaignUpdate</code> field is only returned when the campaign has had at least one <code>UpdateCampaign</code> call.</p>
48    /// </note>
49    /// <p>The properties of the campaign.</p><note>
50    /// <p>The <code>latestCampaignUpdate</code> field is only returned when the campaign has had at least one <code>UpdateCampaign</code> call.</p>
51    /// </note>
52    pub fn campaign(mut self, input: crate::types::Campaign) -> Self {
53        self.campaign = ::std::option::Option::Some(input);
54        self
55    }
56    /// <note>
57    /// <p>The <code>latestCampaignUpdate</code> field is only returned when the campaign has had at least one <code>UpdateCampaign</code> call.</p>
58    /// </note>
59    /// <p>The properties of the campaign.</p><note>
60    /// <p>The <code>latestCampaignUpdate</code> field is only returned when the campaign has had at least one <code>UpdateCampaign</code> call.</p>
61    /// </note>
62    pub fn set_campaign(mut self, input: ::std::option::Option<crate::types::Campaign>) -> Self {
63        self.campaign = input;
64        self
65    }
66    /// <note>
67    /// <p>The <code>latestCampaignUpdate</code> field is only returned when the campaign has had at least one <code>UpdateCampaign</code> call.</p>
68    /// </note>
69    /// <p>The properties of the campaign.</p><note>
70    /// <p>The <code>latestCampaignUpdate</code> field is only returned when the campaign has had at least one <code>UpdateCampaign</code> call.</p>
71    /// </note>
72    pub fn get_campaign(&self) -> &::std::option::Option<crate::types::Campaign> {
73        &self.campaign
74    }
75    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
76        self._request_id = Some(request_id.into());
77        self
78    }
79
80    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
81        self._request_id = request_id;
82        self
83    }
84    /// Consumes the builder and constructs a [`DescribeCampaignOutput`](crate::operation::describe_campaign::DescribeCampaignOutput).
85    pub fn build(self) -> crate::operation::describe_campaign::DescribeCampaignOutput {
86        crate::operation::describe_campaign::DescribeCampaignOutput {
87            campaign: self.campaign,
88            _request_id: self._request_id,
89        }
90    }
91}