1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The returned result of the corresponding request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateInvalidationOutput {
    /// <p>The fully qualified URI of the distribution and invalidation batch request, including the <code>Invalidation ID</code>.</p>
    #[doc(hidden)]
    pub location: std::option::Option<std::string::String>,
    /// <p>The invalidation's information.</p>
    #[doc(hidden)]
    pub invalidation: std::option::Option<crate::types::Invalidation>,
    _request_id: Option<String>,
}
impl CreateInvalidationOutput {
    /// <p>The fully qualified URI of the distribution and invalidation batch request, including the <code>Invalidation ID</code>.</p>
    pub fn location(&self) -> std::option::Option<&str> {
        self.location.as_deref()
    }
    /// <p>The invalidation's information.</p>
    pub fn invalidation(&self) -> std::option::Option<&crate::types::Invalidation> {
        self.invalidation.as_ref()
    }
}
impl aws_http::request_id::RequestId for CreateInvalidationOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateInvalidationOutput {
    /// Creates a new builder-style object to manufacture [`CreateInvalidationOutput`](crate::operation::create_invalidation::CreateInvalidationOutput).
    pub fn builder(
    ) -> crate::operation::create_invalidation::builders::CreateInvalidationOutputBuilder {
        crate::operation::create_invalidation::builders::CreateInvalidationOutputBuilder::default()
    }
}

/// A builder for [`CreateInvalidationOutput`](crate::operation::create_invalidation::CreateInvalidationOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CreateInvalidationOutputBuilder {
    pub(crate) location: std::option::Option<std::string::String>,
    pub(crate) invalidation: std::option::Option<crate::types::Invalidation>,
    _request_id: Option<String>,
}
impl CreateInvalidationOutputBuilder {
    /// <p>The fully qualified URI of the distribution and invalidation batch request, including the <code>Invalidation ID</code>.</p>
    pub fn location(mut self, input: impl Into<std::string::String>) -> Self {
        self.location = Some(input.into());
        self
    }
    /// <p>The fully qualified URI of the distribution and invalidation batch request, including the <code>Invalidation ID</code>.</p>
    pub fn set_location(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.location = input;
        self
    }
    /// <p>The invalidation's information.</p>
    pub fn invalidation(mut self, input: crate::types::Invalidation) -> Self {
        self.invalidation = Some(input);
        self
    }
    /// <p>The invalidation's information.</p>
    pub fn set_invalidation(
        mut self,
        input: std::option::Option<crate::types::Invalidation>,
    ) -> Self {
        self.invalidation = input;
        self
    }
    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
    }
    /// Consumes the builder and constructs a [`CreateInvalidationOutput`](crate::operation::create_invalidation::CreateInvalidationOutput).
    pub fn build(self) -> crate::operation::create_invalidation::CreateInvalidationOutput {
        crate::operation::create_invalidation::CreateInvalidationOutput {
            location: self.location,
            invalidation: self.invalidation,
            _request_id: self._request_id,
        }
    }
}