aws_sdk_apigateway/operation/create_documentation_version/
_create_documentation_version_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A snapshot of the documentation of an API.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateDocumentationVersionOutput {
7    /// <p>The version identifier of the API documentation snapshot.</p>
8    pub version: ::std::option::Option<::std::string::String>,
9    /// <p>The date when the API documentation snapshot is created.</p>
10    pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
11    /// <p>The description of the API documentation snapshot.</p>
12    pub description: ::std::option::Option<::std::string::String>,
13    _request_id: Option<String>,
14}
15impl CreateDocumentationVersionOutput {
16    /// <p>The version identifier of the API documentation snapshot.</p>
17    pub fn version(&self) -> ::std::option::Option<&str> {
18        self.version.as_deref()
19    }
20    /// <p>The date when the API documentation snapshot is created.</p>
21    pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
22        self.created_date.as_ref()
23    }
24    /// <p>The description of the API documentation snapshot.</p>
25    pub fn description(&self) -> ::std::option::Option<&str> {
26        self.description.as_deref()
27    }
28}
29impl ::aws_types::request_id::RequestId for CreateDocumentationVersionOutput {
30    fn request_id(&self) -> Option<&str> {
31        self._request_id.as_deref()
32    }
33}
34impl CreateDocumentationVersionOutput {
35    /// Creates a new builder-style object to manufacture [`CreateDocumentationVersionOutput`](crate::operation::create_documentation_version::CreateDocumentationVersionOutput).
36    pub fn builder() -> crate::operation::create_documentation_version::builders::CreateDocumentationVersionOutputBuilder {
37        crate::operation::create_documentation_version::builders::CreateDocumentationVersionOutputBuilder::default()
38    }
39}
40
41/// A builder for [`CreateDocumentationVersionOutput`](crate::operation::create_documentation_version::CreateDocumentationVersionOutput).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct CreateDocumentationVersionOutputBuilder {
45    pub(crate) version: ::std::option::Option<::std::string::String>,
46    pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
47    pub(crate) description: ::std::option::Option<::std::string::String>,
48    _request_id: Option<String>,
49}
50impl CreateDocumentationVersionOutputBuilder {
51    /// <p>The version identifier of the API documentation snapshot.</p>
52    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.version = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The version identifier of the API documentation snapshot.</p>
57    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.version = input;
59        self
60    }
61    /// <p>The version identifier of the API documentation snapshot.</p>
62    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
63        &self.version
64    }
65    /// <p>The date when the API documentation snapshot is created.</p>
66    pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
67        self.created_date = ::std::option::Option::Some(input);
68        self
69    }
70    /// <p>The date when the API documentation snapshot is created.</p>
71    pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
72        self.created_date = input;
73        self
74    }
75    /// <p>The date when the API documentation snapshot is created.</p>
76    pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
77        &self.created_date
78    }
79    /// <p>The description of the API documentation snapshot.</p>
80    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.description = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The description of the API documentation snapshot.</p>
85    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.description = input;
87        self
88    }
89    /// <p>The description of the API documentation snapshot.</p>
90    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
91        &self.description
92    }
93    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
94        self._request_id = Some(request_id.into());
95        self
96    }
97
98    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
99        self._request_id = request_id;
100        self
101    }
102    /// Consumes the builder and constructs a [`CreateDocumentationVersionOutput`](crate::operation::create_documentation_version::CreateDocumentationVersionOutput).
103    pub fn build(self) -> crate::operation::create_documentation_version::CreateDocumentationVersionOutput {
104        crate::operation::create_documentation_version::CreateDocumentationVersionOutput {
105            version: self.version,
106            created_date: self.created_date,
107            description: self.description,
108            _request_id: self._request_id,
109        }
110    }
111}