Skip to main content

aws_sdk_apigateway/operation/flush_stage_authorizers_cache/
_flush_stage_authorizers_cache_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request to flush authorizer cache entries on a specified stage.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct FlushStageAuthorizersCacheInput {
7    /// <p>The string identifier of the associated RestApi.</p>
8    pub rest_api_id: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the stage to flush.</p>
10    pub stage_name: ::std::option::Option<::std::string::String>,
11}
12impl FlushStageAuthorizersCacheInput {
13    /// <p>The string identifier of the associated RestApi.</p>
14    pub fn rest_api_id(&self) -> ::std::option::Option<&str> {
15        self.rest_api_id.as_deref()
16    }
17    /// <p>The name of the stage to flush.</p>
18    pub fn stage_name(&self) -> ::std::option::Option<&str> {
19        self.stage_name.as_deref()
20    }
21}
22impl FlushStageAuthorizersCacheInput {
23    /// Creates a new builder-style object to manufacture [`FlushStageAuthorizersCacheInput`](crate::operation::flush_stage_authorizers_cache::FlushStageAuthorizersCacheInput).
24    pub fn builder() -> crate::operation::flush_stage_authorizers_cache::builders::FlushStageAuthorizersCacheInputBuilder {
25        crate::operation::flush_stage_authorizers_cache::builders::FlushStageAuthorizersCacheInputBuilder::default()
26    }
27}
28
29/// A builder for [`FlushStageAuthorizersCacheInput`](crate::operation::flush_stage_authorizers_cache::FlushStageAuthorizersCacheInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct FlushStageAuthorizersCacheInputBuilder {
33    pub(crate) rest_api_id: ::std::option::Option<::std::string::String>,
34    pub(crate) stage_name: ::std::option::Option<::std::string::String>,
35}
36impl FlushStageAuthorizersCacheInputBuilder {
37    /// <p>The string identifier of the associated RestApi.</p>
38    /// This field is required.
39    pub fn rest_api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40        self.rest_api_id = ::std::option::Option::Some(input.into());
41        self
42    }
43    /// <p>The string identifier of the associated RestApi.</p>
44    pub fn set_rest_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.rest_api_id = input;
46        self
47    }
48    /// <p>The string identifier of the associated RestApi.</p>
49    pub fn get_rest_api_id(&self) -> &::std::option::Option<::std::string::String> {
50        &self.rest_api_id
51    }
52    /// <p>The name of the stage to flush.</p>
53    /// This field is required.
54    pub fn stage_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.stage_name = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The name of the stage to flush.</p>
59    pub fn set_stage_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.stage_name = input;
61        self
62    }
63    /// <p>The name of the stage to flush.</p>
64    pub fn get_stage_name(&self) -> &::std::option::Option<::std::string::String> {
65        &self.stage_name
66    }
67    /// Consumes the builder and constructs a [`FlushStageAuthorizersCacheInput`](crate::operation::flush_stage_authorizers_cache::FlushStageAuthorizersCacheInput).
68    pub fn build(
69        self,
70    ) -> ::std::result::Result<
71        crate::operation::flush_stage_authorizers_cache::FlushStageAuthorizersCacheInput,
72        ::aws_smithy_types::error::operation::BuildError,
73    > {
74        ::std::result::Result::Ok(crate::operation::flush_stage_authorizers_cache::FlushStageAuthorizersCacheInput {
75            rest_api_id: self.rest_api_id,
76            stage_name: self.stage_name,
77        })
78    }
79}