aws_sdk_apigateway/operation/create_resource/
_create_resource_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateResourceInput {
7 pub rest_api_id: ::std::option::Option<::std::string::String>,
9 pub parent_id: ::std::option::Option<::std::string::String>,
11 pub path_part: ::std::option::Option<::std::string::String>,
13}
14impl CreateResourceInput {
15 pub fn rest_api_id(&self) -> ::std::option::Option<&str> {
17 self.rest_api_id.as_deref()
18 }
19 pub fn parent_id(&self) -> ::std::option::Option<&str> {
21 self.parent_id.as_deref()
22 }
23 pub fn path_part(&self) -> ::std::option::Option<&str> {
25 self.path_part.as_deref()
26 }
27}
28impl CreateResourceInput {
29 pub fn builder() -> crate::operation::create_resource::builders::CreateResourceInputBuilder {
31 crate::operation::create_resource::builders::CreateResourceInputBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct CreateResourceInputBuilder {
39 pub(crate) rest_api_id: ::std::option::Option<::std::string::String>,
40 pub(crate) parent_id: ::std::option::Option<::std::string::String>,
41 pub(crate) path_part: ::std::option::Option<::std::string::String>,
42}
43impl CreateResourceInputBuilder {
44 pub fn rest_api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.rest_api_id = ::std::option::Option::Some(input.into());
48 self
49 }
50 pub fn set_rest_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.rest_api_id = input;
53 self
54 }
55 pub fn get_rest_api_id(&self) -> &::std::option::Option<::std::string::String> {
57 &self.rest_api_id
58 }
59 pub fn parent_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.parent_id = ::std::option::Option::Some(input.into());
63 self
64 }
65 pub fn set_parent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.parent_id = input;
68 self
69 }
70 pub fn get_parent_id(&self) -> &::std::option::Option<::std::string::String> {
72 &self.parent_id
73 }
74 pub fn path_part(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77 self.path_part = ::std::option::Option::Some(input.into());
78 self
79 }
80 pub fn set_path_part(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82 self.path_part = input;
83 self
84 }
85 pub fn get_path_part(&self) -> &::std::option::Option<::std::string::String> {
87 &self.path_part
88 }
89 pub fn build(
91 self,
92 ) -> ::std::result::Result<crate::operation::create_resource::CreateResourceInput, ::aws_smithy_types::error::operation::BuildError> {
93 ::std::result::Result::Ok(crate::operation::create_resource::CreateResourceInput {
94 rest_api_id: self.rest_api_id,
95 parent_id: self.parent_id,
96 path_part: self.path_part,
97 })
98 }
99}