aws_sdk_apigatewayv2/operation/create_model/
_create_model_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 CreateModelOutput {
6    /// <p>The content-type for the model, for example, "application/json".</p>
7    pub content_type: ::std::option::Option<::std::string::String>,
8    /// <p>The description of the model.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The model identifier.</p>
11    pub model_id: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the model. Must be alphanumeric.</p>
13    pub name: ::std::option::Option<::std::string::String>,
14    /// <p>The schema for the model. For application/json models, this should be JSON schema draft 4 model.</p>
15    pub schema: ::std::option::Option<::std::string::String>,
16    _request_id: Option<String>,
17}
18impl CreateModelOutput {
19    /// <p>The content-type for the model, for example, "application/json".</p>
20    pub fn content_type(&self) -> ::std::option::Option<&str> {
21        self.content_type.as_deref()
22    }
23    /// <p>The description of the model.</p>
24    pub fn description(&self) -> ::std::option::Option<&str> {
25        self.description.as_deref()
26    }
27    /// <p>The model identifier.</p>
28    pub fn model_id(&self) -> ::std::option::Option<&str> {
29        self.model_id.as_deref()
30    }
31    /// <p>The name of the model. Must be alphanumeric.</p>
32    pub fn name(&self) -> ::std::option::Option<&str> {
33        self.name.as_deref()
34    }
35    /// <p>The schema for the model. For application/json models, this should be JSON schema draft 4 model.</p>
36    pub fn schema(&self) -> ::std::option::Option<&str> {
37        self.schema.as_deref()
38    }
39}
40impl ::aws_types::request_id::RequestId for CreateModelOutput {
41    fn request_id(&self) -> Option<&str> {
42        self._request_id.as_deref()
43    }
44}
45impl CreateModelOutput {
46    /// Creates a new builder-style object to manufacture [`CreateModelOutput`](crate::operation::create_model::CreateModelOutput).
47    pub fn builder() -> crate::operation::create_model::builders::CreateModelOutputBuilder {
48        crate::operation::create_model::builders::CreateModelOutputBuilder::default()
49    }
50}
51
52/// A builder for [`CreateModelOutput`](crate::operation::create_model::CreateModelOutput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct CreateModelOutputBuilder {
56    pub(crate) content_type: ::std::option::Option<::std::string::String>,
57    pub(crate) description: ::std::option::Option<::std::string::String>,
58    pub(crate) model_id: ::std::option::Option<::std::string::String>,
59    pub(crate) name: ::std::option::Option<::std::string::String>,
60    pub(crate) schema: ::std::option::Option<::std::string::String>,
61    _request_id: Option<String>,
62}
63impl CreateModelOutputBuilder {
64    /// <p>The content-type for the model, for example, "application/json".</p>
65    pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.content_type = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The content-type for the model, for example, "application/json".</p>
70    pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.content_type = input;
72        self
73    }
74    /// <p>The content-type for the model, for example, "application/json".</p>
75    pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
76        &self.content_type
77    }
78    /// <p>The description of the model.</p>
79    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.description = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The description of the model.</p>
84    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.description = input;
86        self
87    }
88    /// <p>The description of the model.</p>
89    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
90        &self.description
91    }
92    /// <p>The model identifier.</p>
93    pub fn model_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.model_id = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>The model identifier.</p>
98    pub fn set_model_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.model_id = input;
100        self
101    }
102    /// <p>The model identifier.</p>
103    pub fn get_model_id(&self) -> &::std::option::Option<::std::string::String> {
104        &self.model_id
105    }
106    /// <p>The name of the model. Must be alphanumeric.</p>
107    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.name = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The name of the model. Must be alphanumeric.</p>
112    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.name = input;
114        self
115    }
116    /// <p>The name of the model. Must be alphanumeric.</p>
117    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
118        &self.name
119    }
120    /// <p>The schema for the model. For application/json models, this should be JSON schema draft 4 model.</p>
121    pub fn schema(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122        self.schema = ::std::option::Option::Some(input.into());
123        self
124    }
125    /// <p>The schema for the model. For application/json models, this should be JSON schema draft 4 model.</p>
126    pub fn set_schema(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.schema = input;
128        self
129    }
130    /// <p>The schema for the model. For application/json models, this should be JSON schema draft 4 model.</p>
131    pub fn get_schema(&self) -> &::std::option::Option<::std::string::String> {
132        &self.schema
133    }
134    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
135        self._request_id = Some(request_id.into());
136        self
137    }
138
139    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
140        self._request_id = request_id;
141        self
142    }
143    /// Consumes the builder and constructs a [`CreateModelOutput`](crate::operation::create_model::CreateModelOutput).
144    pub fn build(self) -> crate::operation::create_model::CreateModelOutput {
145        crate::operation::create_model::CreateModelOutput {
146            content_type: self.content_type,
147            description: self.description,
148            model_id: self.model_id,
149            name: self.name,
150            schema: self.schema,
151            _request_id: self._request_id,
152        }
153    }
154}