aws_sdk_wafv2/types/
_release_summary.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>High level information for an SDK release.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ReleaseSummary {
7    /// <p>The release version.</p>
8    pub release_version: ::std::option::Option<::std::string::String>,
9    /// <p>The timestamp of the release.</p>
10    pub timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
11}
12impl ReleaseSummary {
13    /// <p>The release version.</p>
14    pub fn release_version(&self) -> ::std::option::Option<&str> {
15        self.release_version.as_deref()
16    }
17    /// <p>The timestamp of the release.</p>
18    pub fn timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
19        self.timestamp.as_ref()
20    }
21}
22impl ReleaseSummary {
23    /// Creates a new builder-style object to manufacture [`ReleaseSummary`](crate::types::ReleaseSummary).
24    pub fn builder() -> crate::types::builders::ReleaseSummaryBuilder {
25        crate::types::builders::ReleaseSummaryBuilder::default()
26    }
27}
28
29/// A builder for [`ReleaseSummary`](crate::types::ReleaseSummary).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct ReleaseSummaryBuilder {
33    pub(crate) release_version: ::std::option::Option<::std::string::String>,
34    pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
35}
36impl ReleaseSummaryBuilder {
37    /// <p>The release version.</p>
38    pub fn release_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.release_version = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The release version.</p>
43    pub fn set_release_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.release_version = input;
45        self
46    }
47    /// <p>The release version.</p>
48    pub fn get_release_version(&self) -> &::std::option::Option<::std::string::String> {
49        &self.release_version
50    }
51    /// <p>The timestamp of the release.</p>
52    pub fn timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
53        self.timestamp = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>The timestamp of the release.</p>
57    pub fn set_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
58        self.timestamp = input;
59        self
60    }
61    /// <p>The timestamp of the release.</p>
62    pub fn get_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
63        &self.timestamp
64    }
65    /// Consumes the builder and constructs a [`ReleaseSummary`](crate::types::ReleaseSummary).
66    pub fn build(self) -> crate::types::ReleaseSummary {
67        crate::types::ReleaseSummary {
68            release_version: self.release_version,
69            timestamp: self.timestamp,
70        }
71    }
72}